Created
August 28, 2024 08:46
-
-
Save StackOverflowExcept1on/32c0f60a6d8758524ea9347e7bc456ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; +-------------------------------------------------------------------------+ | |
; | This file was generated by The Interactive Disassembler (IDA) | | |
; | Copyright (c) 2024 Hex-Rays, <support@hex-rays.com> | | |
; | License info: 48-2137-ACAB-99 | | |
; | HexRays | | |
; +-------------------------------------------------------------------------+ | |
; | |
; Input SHA256 : 3398779D63D326A19C39081ECE329D8A63BCF940835AA7A8CB19AD2A4DF548DA | |
; Input MD5 : 790AA59AB6DD6D48078DACB0DFF82411 | |
; Input CRC32 : 6AEF1A24 | |
; Compiler : GNU C++ | |
; File Name : /mnt/tmpfs/libprogram-stage1-c2fdb3435fe.so | |
; Format : ELF64 for x86-64 (Shared object) | |
; Shared Name 'libprogram.so' | |
; | |
; Source File : 'crtstuff.c' | |
; Source File : 'program.544b1767a0473df8-cgu.0' | |
; Source File : 'crtstuff.c' | |
.686p | |
.mmx | |
.model flat | |
.intel_syntax noprefix | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read | |
LOAD segment mempage public 'DATA' use64 | |
assume cs:LOAD | |
dword_0 dd 464C457Fh ; DATA XREF: LOAD:00000000000002B0↓o | |
; LOAD:00000000000002C8↓o ... | |
; File format: \x7FELF | |
db 2 ; File class: 64-bit | |
db 1 ; Data encoding: little-endian | |
db 1 ; File version | |
db 0 ; OS/ABI: UNIX System V ABI | |
db 0 ; ABI Version | |
db 7 dup(0) ; Padding | |
dw 3 ; File type: Shared object | |
dw 3Eh ; Machine: x86-64 | |
dd 1 ; File version | |
dq 0 ; Entry point | |
dq 40h ; PHT file offset | |
dq 15B8h ; SHT file offset | |
dd 0 ; Processor-specific flags | |
dw 40h ; ELF header size | |
dw 38h ; PHT entry size | |
dw 0Ah ; Number of entries in PHT | |
dw 40h ; SHT entry size | |
dw 1Ch ; Number of entries in SHT | |
dw 1Ah ; SHT entry index for string table | |
; ELF64 Program Header | |
; PHT Entry 0 | |
dword_40 dd 6 ; DATA XREF: LOAD:0000000000000050↓o | |
; Type: PHDR | |
dd 4 ; Flags | |
dq 40h ; File offset | |
dq offset dword_40 ; Virtual address | |
dq 40h ; Physical address | |
dq 230h ; Size in file image | |
dq 230h ; Size in memory image | |
dq 8 ; Alignment | |
; PHT Entry 1 | |
dd 1 ; Type: LOAD | |
dd 4 ; Flags | |
dq 0 ; File offset | |
dq 0 ; Virtual address | |
dq 0 ; Physical address | |
dq 604h ; Size in file image | |
dq 604h ; Size in memory image | |
dq 1000h ; Alignment | |
; PHT Entry 2 | |
dd 1 ; Type: LOAD | |
dd 5 ; Flags | |
dq 604h ; File offset | |
dq offset _init_proc ; Virtual address | |
dq 1604h ; Physical address | |
dq 52Ch ; Size in file image | |
dq 52Ch ; Size in memory image | |
dq 1000h ; Alignment | |
; PHT Entry 3 | |
dd 1 ; Type: LOAD | |
dd 6 ; Flags | |
dq 0B30h ; File offset | |
dq offset __do_global_dtors_aux_fini_array_entry ; Virtual address | |
dq 2B30h ; Physical address | |
dq 230h ; Size in file image | |
dq 4D0h ; Size in memory image | |
dq 1000h ; Alignment | |
; PHT Entry 4 | |
dd 1 ; Type: LOAD | |
dd 6 ; Flags | |
dq 0D60h ; File offset | |
dq offset __dso_handle ; Virtual address | |
dq 3D60h ; Physical address | |
dq 8 ; Size in file image | |
dq 9 ; Size in memory image | |
dq 1000h ; Alignment | |
; PHT Entry 5 | |
dd 2 ; Type: DYNAMIC | |
dd 6 ; Flags | |
dq 0BA0h ; File offset | |
dq offset stru_2BA0 ; Virtual address | |
dq 2BA0h ; Physical address | |
dq 170h ; Size in file image | |
dq 170h ; Size in memory image | |
dq 8 ; Alignment | |
; PHT Entry 6 | |
dd 6474E552h ; Type: RO-AFTER | |
dd 4 ; Flags | |
dq 0B30h ; File offset | |
dq offset __do_global_dtors_aux_fini_array_entry ; Virtual address | |
dq 2B30h ; Physical address | |
dq 230h ; Size in file image | |
dq 4D0h ; Size in memory image | |
dq 1 ; Alignment | |
; PHT Entry 7 | |
dd 6474E550h ; Type: EH_FRAME | |
dd 4 ; Flags | |
dq 584h ; File offset | |
dq offset unk_584 ; Virtual address | |
dq 584h ; Physical address | |
dq 1Ch ; Size in file image | |
dq 1Ch ; Size in memory image | |
dq 4 ; Alignment | |
; PHT Entry 8 | |
dd 6474E551h ; Type: STACK | |
dd 6 ; Flags | |
dq 0 ; File offset | |
dq 0 ; Virtual address | |
dq 0 ; Physical address | |
dq 0 ; Size in file image | |
dq 0 ; Size in memory image | |
dq 0 ; Alignment | |
; PHT Entry 9 | |
dd 4 ; Type: NOTE | |
dd 4 ; Flags | |
dq 270h ; File offset | |
dq offset dword_270 ; Virtual address | |
dq 270h ; Physical address | |
dq 24h ; Size in file image | |
dq 24h ; Size in memory image | |
dq 4 ; Alignment | |
; ELF Note Entry | |
dword_270 dd 4 ; DATA XREF: LOAD:0000000000000248↑o | |
; Name Size | |
dd 14h ; Desc Size | |
dd 3 ; Type: NT_GNU_BUILD_ID | |
aGnu db 'GNU',0 ; Name | |
db 0EFh, 51h, 4Bh, 49h, 0F3h, 89h, 59h, 1, 0Dh, 9Bh, 40h ; Desc | |
db 33h, 5Bh, 42h, 77h, 31h, 0BFh, 0Ch, 0B8h, 28h | |
align 8 | |
; ELF Symbol Table | |
Elf64_Sym <0> | |
Elf64_Sym <offset aGmonStart - offset unk_378, 20h, 0, 0, \ ; "__gmon_start__" | |
offset dword_0, 0> | |
Elf64_Sym <offset aItmDeregistert - offset unk_378, 20h, 0, 0, \ ; "_ITM_deregisterTMCloneTable" | |
offset dword_0, 0> | |
Elf64_Sym <offset aItmRegistertmc - offset unk_378, 20h, 0, 0, \ ; "_ITM_registerTMCloneTable" | |
offset dword_0, 0> | |
Elf64_Sym <offset aCxaFinalize - offset unk_378, 20h, 0, 0, \ ; "__cxa_finalize" | |
offset dword_0, 0> | |
Elf64_Sym <offset aMemcpy - offset unk_378, 10h, 0, 0, offset dword_0,\ ; "memcpy" | |
0> | |
Elf64_Sym <offset aGrPanic - offset unk_378, 10h, 0, 0, \ ; "gr_panic" | |
offset dword_0, 0> | |
Elf64_Sym <offset aInit - offset unk_378, 12h, 0, 0Ch, offset init, \ ; "init" | |
2Fh> | |
; ELF GNU Hash Table | |
elf_gnu_hash_nbuckets dd 1 | |
elf_gnu_hash_symbias dd 7 | |
elf_gnu_hash_bitmask_nwords dd 1 | |
elf_gnu_hash_shift dd 1Ah | |
elf_gnu_hash_indexes dq 200000080000000h | |
elf_gnu_hash_bucket dd 7 | |
elf_gnu_hash_chain dd 7C988539h | |
; ELF String Table | |
unk_378 db 0 ; DATA XREF: LOAD:00000000000002B0↑o | |
; LOAD:00000000000002C8↑o ... | |
aGmonStart db '__gmon_start__',0 ; DATA XREF: LOAD:00000000000002B0↑o | |
aItmDeregistert db '_ITM_deregisterTMCloneTable',0 | |
; DATA XREF: LOAD:00000000000002C8↑o | |
aItmRegistertmc db '_ITM_registerTMCloneTable',0 | |
; DATA XREF: LOAD:00000000000002E0↑o | |
aCxaFinalize db '__cxa_finalize',0 ; DATA XREF: LOAD:00000000000002F8↑o | |
aInit db 'init',0 ; DATA XREF: LOAD:0000000000000340↑o | |
aMemcpy db 'memcpy',0 ; DATA XREF: LOAD:0000000000000310↑o | |
aGrPanic db 'gr_panic',0 ; DATA XREF: LOAD:0000000000000328↑o | |
aLibprogramSo db 'libprogram.so',0 | |
; ELF RELA Relocation Table | |
a0 Elf64_Rela <2B30h, 8, 16A0h> ; R_X86_64_RELATIVE +16A0h | |
Elf64_Rela <2B38h, 8, 16E0h> ; R_X86_64_RELATIVE +16E0h | |
Elf64_Rela <2B58h, 8, 1915h> ; R_X86_64_RELATIVE +1915h | |
Elf64_Rela <2B60h, 8, 194Fh> ; R_X86_64_RELATIVE +194Fh | |
Elf64_Rela <2B68h, 8, 18F9h> ; R_X86_64_RELATIVE +18F9h | |
Elf64_Rela <2B70h, 8, 570h> ; R_X86_64_RELATIVE +570h | |
Elf64_Rela <2B80h, 8, 573h> ; R_X86_64_RELATIVE +573h | |
Elf64_Rela <2B90h, 8, 582h> ; R_X86_64_RELATIVE +582h | |
Elf64_Rela <3D60h, 8, 3D60h> ; R_X86_64_RELATIVE +3D60h | |
Elf64_Rela <2D10h, 100000006h, 0> ; R_X86_64_GLOB_DAT __gmon_start__ | |
Elf64_Rela <2D18h, 200000006h, 0> ; R_X86_64_GLOB_DAT _ITM_deregisterTMCloneTable | |
Elf64_Rela <2D20h, 300000006h, 0> ; R_X86_64_GLOB_DAT _ITM_registerTMCloneTable | |
Elf64_Rela <2D28h, 400000006h, 0> ; R_X86_64_GLOB_DAT __cxa_finalize | |
Elf64_Rela <2D30h, 500000006h, 0> ; R_X86_64_GLOB_DAT memcpy | |
Elf64_Rela <2D38h, 600000006h, 0> ; R_X86_64_GLOB_DAT gr_panic | |
; ELF JMPREL Relocation Table | |
Elf64_Rela <2D58h, 400000007h, 0> ; R_X86_64_JUMP_SLOT __cxa_finalize | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read | |
_rodata segment byte public 'CONST' use64 | |
assume cs:_rodata | |
;org 570h | |
aMsg db 'msg' ; DATA XREF: .data.rel.ro:off_2B70↓o | |
aPanickedWith db 'panicked with ',27h ; DATA XREF: .data.rel.ro:off_2B80↓o | |
asc_582 db 27h ; DATA XREF: .data.rel.ro:0000000000002B90↓o | |
_rodata ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read | |
LOAD segment mempage public 'DATA' use64 | |
assume cs:LOAD | |
;org 583h | |
align 4 | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read | |
_eh_frame_hdr segment dword public 'CONST' use64 | |
assume cs:_eh_frame_hdr | |
;org 584h | |
unk_584 db 1 ; DATA XREF: LOAD:00000000000001D8↑o | |
db 1Bh | |
db 3 | |
db 3Bh ; ; | |
db 18h | |
db 0 | |
db 0 | |
db 0 | |
db 2 | |
db 0 | |
db 0 | |
db 0 | |
db 6Ch ; l | |
db 11h | |
db 0 | |
db 0 | |
db 34h ; 4 | |
db 0 | |
db 0 | |
db 0 | |
db 6Ch ; l | |
db 13h | |
db 0 | |
db 0 | |
db 60h ; ` | |
db 0 | |
db 0 | |
db 0 | |
_eh_frame_hdr ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read | |
_eh_frame segment qword public 'CONST' use64 | |
assume cs:_eh_frame | |
;org 5A0h | |
__FRAME_END__ db 14h | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 1 | |
db 7Ah ; z | |
db 52h ; R | |
db 0 | |
db 1 | |
db 78h ; x | |
db 10h | |
db 1 | |
db 1Bh | |
db 0Ch | |
db 7 | |
db 8 | |
db 90h | |
db 1 | |
db 0 | |
db 0 | |
db 28h ; ( | |
db 0 | |
db 0 | |
db 0 | |
db 1Ch | |
db 0 | |
db 0 | |
db 0 | |
db 30h ; 0 | |
db 11h | |
db 0 | |
db 0 | |
db 0F2h | |
db 1 | |
db 0 | |
db 0 | |
db 0 | |
db 41h ; A | |
db 0Eh | |
db 10h | |
db 86h | |
db 2 | |
db 43h ; C | |
db 0Dh | |
db 6 | |
db 4Dh ; M | |
db 83h | |
db 7 | |
db 8Ch | |
db 6 | |
db 8Dh | |
db 5 | |
db 8Eh | |
db 4 | |
db 8Fh | |
db 3 | |
db 3 | |
db 0E0h | |
db 1 | |
db 0Ch | |
db 7 | |
db 8 | |
db 0 | |
db 0 | |
db 18h | |
db 0 | |
db 0 | |
db 0 | |
db 48h ; H | |
db 0 | |
db 0 | |
db 0 | |
db 4 | |
db 13h | |
db 0 | |
db 0 | |
db 9 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 41h ; A | |
db 0Eh | |
db 10h | |
db 86h | |
db 2 | |
db 43h ; C | |
db 0Dh | |
db 6 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
_eh_frame ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
_init segment dword public 'CODE' use64 | |
assume cs:_init | |
;org 1604h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
; =============== S U B R O U T I N E ======================================= | |
; __int64 (**init_proc())(void) | |
public _init_proc | |
_init_proc proc near ; DATA XREF: LOAD:00000000000000C0↑o | |
endbr64 ; _init | |
sub rsp, 8 | |
mov rax, cs:__gmon_start___ptr | |
test rax, rax | |
jz short loc_161A | |
call rax ; __gmon_start__ | |
loc_161A: ; CODE XREF: _init_proc+12↑j | |
add rsp, 8 | |
retn | |
_init_proc endp | |
_init ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
LOAD segment mempage public 'CODE' use64 | |
assume cs:LOAD | |
;org 161Fh | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
align 20h | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
_fini segment dword public 'CODE' use64 | |
assume cs:_fini | |
;org 1620h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
; =============== S U B R O U T I N E ======================================= | |
public _term_proc | |
_term_proc proc near | |
endbr64 ; _fini | |
sub rsp, 8 | |
add rsp, 8 | |
retn | |
_term_proc endp | |
_fini ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
LOAD segment mempage public 'CODE' use64 | |
assume cs:LOAD | |
;org 162Dh | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
align 10h | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
_text segment para public 'CODE' use64 | |
assume cs:_text | |
;org 1630h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
; =============== S U B R O U T I N E ======================================= | |
; void **deregister_tm_clones() | |
deregister_tm_clones proc near ; CODE XREF: __do_global_dtors_aux:loc_16C7↓p | |
lea rdi, __dso_handle | |
lea rax, __dso_handle | |
cmp rax, rdi | |
jz short locret_1658 | |
mov rax, cs:_ITM_deregisterTMCloneTable_ptr | |
test rax, rax | |
jz short locret_1658 | |
jmp rax | |
; --------------------------------------------------------------------------- | |
align 8 | |
locret_1658: ; CODE XREF: deregister_tm_clones+11↑j | |
; deregister_tm_clones+1D↑j | |
retn | |
deregister_tm_clones endp | |
; --------------------------------------------------------------------------- | |
align 20h | |
; =============== S U B R O U T I N E ======================================= | |
register_tm_clones proc near ; CODE XREF: frame_dummy+4↓j | |
lea rdi, __dso_handle | |
lea rsi, __dso_handle | |
sub rsi, rdi | |
mov rax, rsi | |
shr rsi, 3Fh | |
sar rax, 3 | |
add rsi, rax | |
sar rsi, 1 | |
jz short locret_1698 | |
mov rax, cs:_ITM_registerTMCloneTable_ptr | |
test rax, rax | |
jz short locret_1698 | |
jmp rax | |
; --------------------------------------------------------------------------- | |
align 8 | |
locret_1698: ; CODE XREF: register_tm_clones+22↑j | |
; register_tm_clones+2E↑j | |
retn | |
register_tm_clones endp | |
; --------------------------------------------------------------------------- | |
align 20h | |
; =============== S U B R O U T I N E ======================================= | |
; void **_do_global_dtors_aux() | |
__do_global_dtors_aux proc near ; DATA XREF: .fini_array:__do_global_dtors_aux_fini_array_entry↓o | |
endbr64 | |
cmp cs:completed_0, 0 | |
jnz short locret_16D8 | |
push rbp | |
cmp cs:__cxa_finalize_ptr, 0 | |
mov rbp, rsp | |
jz short loc_16C7 | |
mov rdi, cs:__dso_handle ; void * | |
call ___cxa_finalize | |
loc_16C7: ; CODE XREF: __do_global_dtors_aux+19↑j | |
call deregister_tm_clones | |
mov cs:completed_0, 1 | |
pop rbp | |
retn | |
; --------------------------------------------------------------------------- | |
align 8 | |
locret_16D8: ; CODE XREF: __do_global_dtors_aux+B↑j | |
retn | |
__do_global_dtors_aux endp | |
; --------------------------------------------------------------------------- | |
align 20h | |
; =============== S U B R O U T I N E ======================================= | |
frame_dummy proc near ; DATA XREF: .init_array:__frame_dummy_init_array_entry↓o | |
endbr64 | |
jmp register_tm_clones | |
frame_dummy endp | |
; --------------------------------------------------------------------------- | |
align 10h | |
; =============== S U B R O U T I N E ======================================= | |
; Attributes: bp-based frame | |
; bool __fastcall core::fmt::write(__int64, __int64, _QWORD *) | |
_ZN4core3fmt5write17h42450338cf9c36b5E proc near | |
; CODE XREF: core::fmt::Write::write_fmt+17↓j | |
; <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt+39↓p | |
var_78 = qword ptr -78h | |
var_70 = qword ptr -70h | |
var_68 = qword ptr -68h | |
var_60 = qword ptr -60h | |
var_58 = qword ptr -58h | |
var_50 = qword ptr -50h | |
var_48 = qword ptr -48h | |
var_40 = qword ptr -40h | |
var_38 = byte ptr -38h | |
var_30 = qword ptr -30h | |
; __unwind { | |
push rbp | |
mov rbp, rsp | |
push r15 | |
push r14 | |
push r13 | |
push r12 | |
push rbx | |
sub rsp, 58h | |
mov [rbp+var_40], 20h ; ' ' | |
mov [rbp+var_38], 3 | |
mov [rbp+var_70], 0 | |
mov [rbp+var_60], 0 | |
mov [rbp+var_50], rdi | |
mov [rbp+var_48], rsi | |
mov r12, [rdx+20h] | |
test r12, r12 | |
mov [rbp+var_30], rdx | |
jz loc_183C | |
mov rax, [rdx+28h] | |
test rax, rax | |
jz loc_189D | |
mov r13, [rdx] | |
mov r14, [rdx+10h] | |
add r13, 8 | |
imul rax, 38h ; '8' | |
mov [rbp+var_78], rax | |
xor ebx, ebx | |
xor r15d, r15d | |
nop dword ptr [rax+rax+00h] | |
loc_1760: ; CODE XREF: core::fmt::write+144↓j | |
mov rdx, [r13+0] | |
test rdx, rdx | |
jz short loc_1780 | |
mov rdi, [rbp+var_50] | |
mov rax, [rbp+var_48] | |
mov rsi, [r13-8] | |
call qword ptr [rax+18h] | |
test al, al | |
jnz loc_18CD | |
loc_1780: ; CODE XREF: core::fmt::write+77↑j | |
mov eax, [r12+rbx+28h] | |
mov dword ptr [rbp+var_40], eax | |
movzx eax, byte ptr [r12+rbx+30h] | |
mov [rbp+var_38], al | |
mov eax, [r12+rbx+2Ch] | |
mov dword ptr [rbp+var_40+4], eax | |
mov rcx, [r12+rbx+10h] | |
mov rax, [r12+rbx+18h] | |
test rcx, rcx | |
jz short loc_17C3 | |
cmp ecx, 1 | |
jnz short loc_17B9 | |
shl rax, 4 | |
cmp qword ptr [r14+rax+8], 0 | |
jz short loc_17BD | |
loc_17B9: ; CODE XREF: core::fmt::write+BB↑j | |
xor ecx, ecx | |
jmp short loc_17C8 | |
; --------------------------------------------------------------------------- | |
loc_17BD: ; CODE XREF: core::fmt::write+C7↑j | |
add rax, r14 | |
mov rax, [rax] | |
loc_17C3: ; CODE XREF: core::fmt::write+B6↑j | |
mov ecx, 1 | |
loc_17C8: ; CODE XREF: core::fmt::write+CB↑j | |
mov [rbp+var_70], rcx | |
mov [rbp+var_68], rax | |
mov rcx, [r12+rbx] | |
cmp rcx, 2 | |
jz short loc_17F0 | |
mov rax, [r12+rbx+8] | |
cmp ecx, 1 | |
jnz short loc_17FA | |
shl rax, 4 | |
cmp qword ptr [r14+rax+8], 0 | |
jz short loc_17F4 | |
loc_17F0: ; CODE XREF: core::fmt::write+E8↑j | |
xor ecx, ecx | |
jmp short loc_17FF | |
; --------------------------------------------------------------------------- | |
loc_17F4: ; CODE XREF: core::fmt::write+FE↑j | |
add rax, r14 | |
mov rax, [rax] | |
loc_17FA: ; CODE XREF: core::fmt::write+F2↑j | |
mov ecx, 1 | |
loc_17FF: ; CODE XREF: core::fmt::write+102↑j | |
mov [rbp+var_60], rcx | |
mov [rbp+var_58], rax | |
mov rax, [r12+rbx+20h] | |
shl rax, 4 | |
mov rdi, [r14+rax] | |
lea rsi, [rbp+var_70] | |
call qword ptr [r14+rax+8] | |
test al, al | |
jnz loc_18CD | |
add r13, 10h | |
add rbx, 38h ; '8' | |
inc r15 | |
cmp [rbp+var_78], rbx | |
jnz loc_1760 | |
jmp short loc_18A0 | |
; --------------------------------------------------------------------------- | |
loc_183C: ; CODE XREF: core::fmt::write+40↑j | |
mov rbx, [rdx+18h] | |
test rbx, rbx | |
jz short loc_189D | |
mov r12, [rdx+10h] | |
mov r13, [rdx] | |
shl rbx, 4 | |
xor r14d, r14d | |
xor r15d, r15d | |
db 2Eh | |
nop word ptr [rax+rax+00000000h] | |
loc_1860: ; CODE XREF: core::fmt::write+1A9↓j | |
mov rdx, [r13+r14+8] | |
test rdx, rdx | |
jz short loc_187E | |
mov rdi, [rbp+var_50] | |
mov rax, [rbp+var_48] | |
mov rsi, [r13+r14+0] | |
call qword ptr [rax+18h] | |
test al, al | |
jnz short loc_18CD | |
loc_187E: ; CODE XREF: core::fmt::write+178↑j | |
mov rdi, [r12+r14] | |
lea rsi, [rbp+var_70] | |
call qword ptr [r12+r14+8] | |
test al, al | |
jnz short loc_18CD | |
add r14, 10h | |
inc r15 | |
cmp rbx, r14 | |
jnz short loc_1860 | |
jmp short loc_18A0 | |
; --------------------------------------------------------------------------- | |
loc_189D: ; CODE XREF: core::fmt::write+4D↑j | |
; core::fmt::write+153↑j | |
xor r15d, r15d | |
loc_18A0: ; CODE XREF: core::fmt::write+14A↑j | |
; core::fmt::write+1AB↑j | |
mov rax, [rbp+var_30] | |
cmp r15, [rax+8] | |
jnb short loc_18D1 | |
mov rax, [rbp+var_30] | |
mov rax, [rax] | |
shl r15, 4 | |
mov rdi, [rbp+var_50] | |
mov rcx, [rbp+var_48] | |
mov rsi, [rax+r15] | |
mov rdx, [rax+r15+8] | |
call qword ptr [rcx+18h] | |
test al, al | |
jz short loc_18D1 | |
loc_18CD: ; CODE XREF: core::fmt::write+8A↑j | |
; core::fmt::write+12F↑j ... | |
mov al, 1 | |
jmp short loc_18D3 | |
; --------------------------------------------------------------------------- | |
loc_18D1: ; CODE XREF: core::fmt::write+1B8↑j | |
; core::fmt::write+1DB↑j | |
xor eax, eax | |
loc_18D3: ; CODE XREF: core::fmt::write+1DF↑j | |
add rsp, 58h | |
pop rbx | |
pop r12 | |
pop r13 | |
pop r14 | |
pop r15 | |
pop rbp | |
retn | |
; } // starts at 16F0 | |
_ZN4core3fmt5write17h42450338cf9c36b5E endp | |
; --------------------------------------------------------------------------- | |
align 10h | |
; =============== S U B R O U T I N E ======================================= | |
; Attributes: bp-based frame | |
; __int64 core::panicking::panic_fmt(void) | |
_ZN4core9panicking9panic_fmt17hf986df957479a2d9E proc near ; CODE XREF: init+2A↓p | |
; __unwind { | |
push rbp | |
mov rbp, rsp | |
call rust_begin_unwind | |
; } // starts at 18F0 | |
_ZN4core9panicking9panic_fmt17hf986df957479a2d9E endp ; sp-analysis failed | |
; =============== S U B R O U T I N E ======================================= | |
; bool __fastcall core::fmt::Write::write_fmt(__int64, _QWORD *) | |
_ZN4core3fmt5Write9write_fmt17he5b4ca05c5ed9456E proc near | |
; CODE XREF: rust_begin_unwind+52↓p | |
; DATA XREF: .data.rel.ro:0000000000002B68↓o | |
mov rdx, rsi | |
mov rax, [rsi+8] | |
cmp rax, 1 | |
jz short loc_1909 | |
test rax, rax | |
loc_1909: ; CODE XREF: core::fmt::Write::write_fmt+B↑j | |
lea rsi, unk_2B40 | |
jmp _ZN4core3fmt5write17h42450338cf9c36b5E ; core::fmt::write | |
_ZN4core3fmt5Write9write_fmt17he5b4ca05c5ed9456E endp | |
; =============== S U B R O U T I N E ======================================= | |
; bool __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str(_DWORD *, const void *, size_t) | |
_ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$9write_str17h7f63bc799397b7c4E proc near | |
; DATA XREF: .data.rel.ro:0000000000002B58↓o | |
push r15 | |
push r14 | |
push rbx | |
mov rbx, rdx | |
mov eax, [rdi] | |
mov r15d, 400h | |
sub r15, rax | |
cmp r15, rdx | |
jb short loc_1943 | |
mov r14, rdi | |
add rdi, rax | |
add rdi, 4 ; dest | |
mov rdx, rbx ; n | |
call cs:memcpy_ptr | |
add [r14], ebx | |
loc_1943: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str+16↑j | |
cmp r15, rbx | |
setb al | |
pop rbx | |
pop r14 | |
pop r15 | |
retn | |
_ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$9write_str17h7f63bc799397b7c4E endp | |
; =============== S U B R O U T I N E ======================================= | |
; char __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char(_DWORD *, unsigned int) | |
_ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$10write_char17h62e5f55538f223e2E proc near | |
; DATA XREF: .data.rel.ro:0000000000002B60↓o | |
mov ecx, [rdi] | |
mov rdx, rcx | |
sub rdx, 400h | |
setnz al | |
cmp esi, 80h | |
setb r8b | |
test r8b, al | |
jz short loc_1979 | |
mov [rdi+rcx+4], sil | |
push 1 | |
jmp loc_1A29 | |
; --------------------------------------------------------------------------- | |
loc_1979: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+1C↑j | |
neg rdx | |
cmp esi, 800h | |
setb al | |
cmp rdx, 2 | |
setnb r8b | |
test al, r8b | |
jz short loc_19AE | |
mov eax, esi | |
shr eax, 6 | |
or al, 0C0h | |
mov [rdi+rcx+4], al | |
and sil, 3Fh | |
or sil, 80h | |
mov [rdi+rcx+5], sil | |
push 2 | |
jmp short loc_1A29 | |
; --------------------------------------------------------------------------- | |
loc_19AE: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+41↑j | |
cmp esi, 10000h | |
setb al | |
cmp rdx, 3 | |
setnb r8b | |
test al, r8b | |
jz short loc_19ED | |
mov eax, esi | |
shr eax, 0Ch | |
or al, 0E0h | |
mov [rdi+rcx+4], al | |
mov eax, esi | |
shr eax, 6 | |
and al, 3Fh | |
or al, 80h | |
mov [rdi+rcx+5], al | |
and sil, 3Fh | |
or sil, 80h | |
mov [rdi+rcx+6], sil | |
push 3 | |
jmp short loc_1A29 | |
; --------------------------------------------------------------------------- | |
loc_19ED: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+73↑j | |
mov al, 1 | |
cmp rdx, 3 | |
jbe short locret_1A30 | |
mov eax, esi | |
shr eax, 12h | |
or al, 0F0h | |
mov [rdi+rcx+4], al | |
mov eax, esi | |
shr eax, 0Ch | |
and al, 3Fh | |
or al, 80h | |
mov [rdi+rcx+5], al | |
mov eax, esi | |
shr eax, 6 | |
and al, 3Fh | |
or al, 80h | |
mov [rdi+rcx+6], al | |
and sil, 3Fh | |
or sil, 80h | |
mov [rdi+rcx+7], sil | |
push 4 | |
loc_1A29: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+25↑j | |
; <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+5D↑j ... | |
pop rax | |
add ecx, eax | |
mov [rdi], ecx | |
xor eax, eax | |
locret_1A30: ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char+A4↑j | |
retn | |
_ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$10write_char17h62e5f55538f223e2E endp | |
; =============== S U B R O U T I N E ======================================= | |
public init | |
init proc near ; DATA XREF: LOAD:0000000000000340↑o | |
var_30 = byte ptr -30h | |
sub rsp, 38h | |
lea rax, off_2B70 ; "msg" | |
lea rdi, [rsp+38h+var_30] | |
mov [rdi], rax | |
mov qword ptr [rdi+8], 1 | |
mov qword ptr [rdi+10h], 8 | |
xorps xmm0, xmm0 | |
movups xmmword ptr [rdi+18h], xmm0 | |
call _ZN4core9panicking9panic_fmt17hf986df957479a2d9E ; core::panicking::panic_fmt | |
init endp ; sp-analysis failed | |
; =============== S U B R O U T I N E ======================================= | |
; __int64 __fastcall rust_begin_unwind(__int64) | |
rust_begin_unwind proc near ; CODE XREF: core::panicking::panic_fmt+4↑p | |
var_450 = qword ptr -450h | |
var_448 = byte ptr -448h | |
var_438 = qword ptr -438h | |
var_404 = dword ptr -404h | |
var_400 = byte ptr -400h | |
sub rsp, 458h | |
lea rax, [rsp+458h+var_450] | |
mov [rax], rdi | |
lea rdi, [rsp+458h+var_404] | |
and dword ptr [rdi], 0 | |
lea rcx, [rsp+458h+var_448] | |
mov [rcx], rax | |
lea rax, off_2B80 ; "panicked with '" | |
lea rsi, [rsp+458h+var_438] | |
mov [rsi], rax | |
mov qword ptr [rsi+8], 2 | |
and qword ptr [rsi+20h], 0 | |
lea rax, _ZN76_$LT$core__panic__panic_info__PanicMessage$u20$as$u20$core__fmt__Display$GT$3fmt17h99a5d0e6dcda5aebE ; <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt | |
mov [rcx+8], rax | |
mov [rsi+10h], rcx | |
mov qword ptr [rsi+18h], 1 | |
call _ZN4core3fmt5Write9write_fmt17he5b4ca05c5ed9456E ; core::fmt::Write::write_fmt | |
lea rdi, [rsp+458h+var_400] | |
mov esi, [rdi-4] | |
call cs:gr_panic_ptr | |
rust_begin_unwind endp ; sp-analysis failed | |
; =============== S U B R O U T I N E ======================================= | |
; bool __fastcall <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt(_OWORD **, __int64) | |
_ZN76_$LT$core__panic__panic_info__PanicMessage$u20$as$u20$core__fmt__Display$GT$3fmt17h99a5d0e6dcda5aebE proc near | |
; DATA XREF: rust_begin_unwind+3B↑o | |
var_38 = xmmword ptr -38h | |
var_28 = xmmword ptr -28h | |
var_18 = xmmword ptr -18h | |
sub rsp, 38h | |
mov rax, [rdi] | |
movups xmm0, xmmword ptr [rax] | |
movups xmm1, xmmword ptr [rax+10h] | |
movups xmm2, xmmword ptr [rax+20h] | |
movaps [rsp+38h+var_38], xmm0 | |
movaps [rsp+38h+var_18], xmm2 | |
movaps [rsp+38h+var_28], xmm1 | |
mov rax, qword ptr [rsp+38h+var_38+8] | |
cmp rax, 1 | |
jz short loc_1AF3 | |
test rax, rax | |
loc_1AF3: ; CODE XREF: <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt+29↑j | |
mov rdi, [rsi+20h] | |
mov rsi, [rsi+28h] | |
mov rdx, rsp | |
call _ZN4core3fmt5write17h42450338cf9c36b5E ; core::fmt::write | |
add rsp, 38h | |
retn | |
_ZN76_$LT$core__panic__panic_info__PanicMessage$u20$as$u20$core__fmt__Display$GT$3fmt17h99a5d0e6dcda5aebE endp | |
_text ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
LOAD segment mempage public 'CODE' use64 | |
assume cs:LOAD | |
;org 1B08h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
align 10h | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure code | |
; Segment permissions: Read/Execute | |
_plt segment para public 'CODE' use64 | |
assume cs:_plt | |
;org 1B10h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
; =============== S U B R O U T I N E ======================================= | |
sub_1B10 proc near ; CODE XREF: .plt:0000000000001B2B↓j | |
push cs:qword_2D48 | |
jmp cs:qword_2D50 | |
sub_1B10 endp | |
; --------------------------------------------------------------------------- | |
align 20h | |
; [00000006 BYTES: COLLAPSED FUNCTION ___cxa_finalize] | |
; --------------------------------------------------------------------------- | |
push 0 | |
jmp sub_1B10 | |
_plt ends | |
; ELF Termination Function Table | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_fini_array segment qword public 'DATA' use64 | |
assume cs:_fini_array | |
;org 2B30h | |
__do_global_dtors_aux_fini_array_entry dq offset __do_global_dtors_aux | |
; DATA XREF: LOAD:00000000000000F8↑o | |
; LOAD:00000000000001A0↑o | |
_fini_array ends | |
; ELF Initialization Function Table | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_init_array segment qword public 'DATA' use64 | |
assume cs:_init_array | |
;org 2B38h | |
__frame_dummy_init_array_entry dq offset frame_dummy | |
_init_array ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_data_rel_ro segment qword public 'DATA' use64 | |
assume cs:_data_rel_ro | |
;org 2B40h | |
unk_2B40 db 0 ; DATA XREF: core::fmt::Write::write_fmt:loc_1909↑o | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 4 | |
db 4 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 4 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
dq offset _ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$9write_str17h7f63bc799397b7c4E ; <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str | |
dq offset _ZN81_$LT$arrayvec__array_string__ArrayString$LT$_$GT$$u20$as$u20$core__fmt__Write$GT$10write_char17h62e5f55538f223e2E ; <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char | |
dq offset _ZN4core3fmt5Write9write_fmt17he5b4ca05c5ed9456E ; core::fmt::Write::write_fmt | |
off_2B70 dq offset aMsg ; DATA XREF: init+4↑o | |
; "msg" | |
db 3 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
off_2B80 dq offset aPanickedWith ; DATA XREF: rust_begin_unwind+1F↑o | |
; "panicked with '" | |
db 0Fh | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
dq offset asc_582 ; "'" | |
db 1 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
db 0 | |
_data_rel_ro ends | |
; ELF Dynamic Information | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
LOAD segment mempage public 'DATA' use64 | |
assume cs:LOAD | |
;org 2BA0h | |
stru_2BA0 Elf64_Dyn <0Eh, 6Ah> ; DATA XREF: LOAD:0000000000000168↑o | |
; .got.plt:_GLOBAL_OFFSET_TABLE_↓o | |
; DT_SONAME libprogram.so | |
Elf64_Dyn <1Eh, 8> ; DT_FLAGS | |
Elf64_Dyn <6FFFFFFBh, 1> ; DT_FLAGS_1 | |
Elf64_Dyn <7, 3F0h> ; DT_RELA | |
Elf64_Dyn <8, 168h> ; DT_RELASZ | |
Elf64_Dyn <9, 18h> ; DT_RELAENT | |
Elf64_Dyn <6FFFFFF9h, 9> ; DT_RELACOUNT | |
Elf64_Dyn <17h, 558h> ; DT_JMPREL | |
Elf64_Dyn <2, 18h> ; DT_PLTRELSZ | |
Elf64_Dyn <3, 2D40h> ; DT_PLTGOT | |
Elf64_Dyn <14h, 7> ; DT_PLTREL | |
Elf64_Dyn <6, 298h> ; DT_SYMTAB | |
Elf64_Dyn <0Bh, 18h> ; DT_SYMENT | |
Elf64_Dyn <5, 378h> ; DT_STRTAB | |
Elf64_Dyn <0Ah, 78h> ; DT_STRSZ | |
Elf64_Dyn <6FFFFEF5h, 358h> ; DT_GNU_HASH | |
Elf64_Dyn <19h, 2B38h> ; DT_INIT_ARRAY | |
Elf64_Dyn <1Bh, 8> ; DT_INIT_ARRAYSZ | |
Elf64_Dyn <1Ah, 2B30h> ; DT_FINI_ARRAY | |
Elf64_Dyn <1Ch, 8> ; DT_FINI_ARRAYSZ | |
Elf64_Dyn <0Ch, 1604h> ; DT_INIT | |
Elf64_Dyn <0Dh, 1620h> ; DT_FINI | |
Elf64_Dyn <0> ; DT_NULL | |
LOAD ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_got segment qword public 'DATA' use64 | |
assume cs:_got | |
;org 2D10h | |
__gmon_start___ptr dq offset __gmon_start__ ; DATA XREF: _init_proc+8↑r | |
_ITM_deregisterTMCloneTable_ptr dq offset _ITM_deregisterTMCloneTable | |
; DATA XREF: deregister_tm_clones+13↑r | |
_ITM_registerTMCloneTable_ptr dq offset _ITM_registerTMCloneTable | |
; DATA XREF: register_tm_clones+24↑r | |
__cxa_finalize_ptr dq offset __cxa_finalize ; DATA XREF: __do_global_dtors_aux+E↑r | |
memcpy_ptr dq offset memcpy ; DATA XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str+25↑r | |
gr_panic_ptr dq offset gr_panic ; DATA XREF: rust_begin_unwind+5F↑r | |
_got ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_got_plt segment qword public 'DATA' use64 | |
assume cs:_got_plt | |
;org 2D40h | |
_GLOBAL_OFFSET_TABLE_ dq offset stru_2BA0 | |
qword_2D48 dq 0 ; DATA XREF: sub_1B10↑r | |
qword_2D50 dq 0 ; DATA XREF: sub_1B10+6↑r | |
off_2D58 dq offset __cxa_finalize ; DATA XREF: ___cxa_finalize↑r | |
_got_plt ends | |
; =========================================================================== | |
; Segment type: Uninitialized | |
; Segment permissions: Read/Write | |
_relro_padding segment byte public 'BSS' use64 | |
assume cs:_relro_padding | |
;org 2D60h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
align 400h | |
_relro_padding ends | |
; =========================================================================== | |
; Segment type: Pure data | |
; Segment permissions: Read/Write | |
_data segment qword public 'DATA' use64 | |
assume cs:_data | |
;org 3D60h | |
; void *_dso_handle | |
__dso_handle dq offset __dso_handle ; DATA XREF: LOAD:0000000000000130↑o | |
; deregister_tm_clones↑o ... | |
_data ends | |
; =========================================================================== | |
; Segment type: Uninitialized | |
; Segment permissions: Read/Write | |
_bss segment byte public 'BSS' use64 | |
assume cs:_bss | |
;org 3D68h | |
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing | |
completed_0 db ? ; DATA XREF: __do_global_dtors_aux+4↑r | |
; __do_global_dtors_aux+2C↑w | |
_bss ends | |
; =========================================================================== | |
; Segment type: Externs | |
; extern | |
; __int64 _gmon_start__(void) | |
extrn __gmon_start__:near ; weak ; CODE XREF: _init_proc+14↑p | |
; DATA XREF: .got:__gmon_start___ptr↑o | |
extrn _ITM_deregisterTMCloneTable ; weak | |
; DATA XREF: .got:_ITM_deregisterTMCloneTable_ptr↑o | |
extrn _ITM_registerTMCloneTable ; weak | |
; DATA XREF: .got:_ITM_registerTMCloneTable_ptr↑o | |
; int _cxa_finalize(void *) | |
extrn __cxa_finalize:near ; weak ; CODE XREF: ___cxa_finalize↑j | |
; DATA XREF: .got:__cxa_finalize_ptr↑o ... | |
; void *memcpy(void *dest, const void *src, size_t n) | |
extrn memcpy:near ; CODE XREF: <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str+25↑p | |
; DATA XREF: .got:memcpy_ptr↑o | |
; __int64 __fastcall gr_panic(_QWORD, _QWORD) | |
extrn gr_panic:near ; CODE XREF: rust_begin_unwind+5F↑p | |
; DATA XREF: .got:gr_panic_ptr↑o | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file was generated by the Hex-Rays decompiler version 9.0.0.240807. | |
Copyright (c) 2007-2021 Hex-Rays <info@hex-rays.com> | |
Detected compiler: GNU C++ | |
*/ | |
#include <defs.h> | |
//------------------------------------------------------------------------- | |
// Function declarations | |
__int64 (**init_proc())(void); | |
void term_proc(); | |
void **deregister_tm_clones(); | |
__int64 register_tm_clones(void); // weak | |
void **_do_global_dtors_aux(); | |
__int64 frame_dummy(); // weak | |
bool __fastcall core::fmt::write(__int64 a1, __int64 a2, _QWORD *a3); | |
__int64 core::panicking::panic_fmt(void); // weak | |
bool __fastcall core::fmt::Write::write_fmt(__int64 a1, _QWORD *a2); | |
bool __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str(_DWORD *a1, const void *a2, size_t a3); | |
char __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char(_DWORD *a1, unsigned int a2); | |
__int64 init(); // weak | |
__int64 __fastcall rust_begin_unwind(__int64 a1); | |
bool __fastcall <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt(_OWORD **a1, __int64 a2); | |
void sub_1B10(); | |
// int __cxa_finalize(void *); | |
// __int64 _gmon_start__(void); weak | |
// int _cxa_finalize(void *); | |
// void *memcpy(void *dest, const void *src, size_t n); | |
// __int64 __fastcall gr_panic(_QWORD, _QWORD); weak | |
//------------------------------------------------------------------------- | |
// Data declarations | |
_UNKNOWN unk_2B40; // weak | |
char *off_2B80 = "panicked with '"; // weak | |
void *_dso_handle = &_dso_handle; // idb | |
char completed_0; // weak | |
//----- (0000000000001604) ---------------------------------------------------- | |
__int64 (**init_proc())(void) | |
{ | |
__int64 (**result)(void); // rax | |
result = &_gmon_start__; | |
if ( &_gmon_start__ ) | |
return (__int64 (**)(void))_gmon_start__(); | |
return result; | |
} | |
// 3D70: using guessed type __int64 _gmon_start__(void); | |
//----- (0000000000001620) ---------------------------------------------------- | |
void term_proc() | |
{ | |
; | |
} | |
//----- (0000000000001630) ---------------------------------------------------- | |
void **deregister_tm_clones() | |
{ | |
return &_dso_handle; | |
} | |
//----- (0000000000001660) ---------------------------------------------------- | |
__int64 register_tm_clones() | |
{ | |
return 0LL; | |
} | |
// 1660: using guessed type __int64 register_tm_clones(); | |
//----- (00000000000016A0) ---------------------------------------------------- | |
void **_do_global_dtors_aux() | |
{ | |
void **result; // rax | |
if ( !completed_0 ) | |
{ | |
if ( &_cxa_finalize ) | |
__cxa_finalize(_dso_handle); | |
result = deregister_tm_clones(); | |
completed_0 = 1; | |
} | |
return result; | |
} | |
// 3D68: using guessed type char completed_0; | |
//----- (00000000000016E0) ---------------------------------------------------- | |
__int64 frame_dummy() | |
{ | |
return register_tm_clones(); | |
} | |
// 1660: using guessed type __int64 register_tm_clones(void); | |
// 16E0: using guessed type __int64 frame_dummy(); | |
//----- (00000000000016F0) ---------------------------------------------------- | |
bool __fastcall core::fmt::write(__int64 a1, __int64 a2, _QWORD *a3) | |
{ | |
__int64 v3; // r12 | |
__int64 v4; // rax | |
__int64 v5; // r14 | |
_QWORD *v6; // r13 | |
__int64 v7; // rbx | |
unsigned __int64 v8; // r15 | |
__int64 v9; // rcx | |
__int64 v10; // rax | |
__int64 v11; // rcx | |
__int64 v12; // rcx | |
__int64 v13; // rcx | |
__int64 v14; // rbx | |
__int64 v15; // r12 | |
__int64 v16; // r13 | |
__int64 v17; // rbx | |
__int64 v18; // r14 | |
__int64 v20; // [rsp+8h] [rbp-78h] | |
_QWORD v21[2]; // [rsp+10h] [rbp-70h] BYREF | |
__int64 v22; // [rsp+20h] [rbp-60h] | |
__int64 v23; // [rsp+28h] [rbp-58h] | |
__int64 v24; // [rsp+30h] [rbp-50h] | |
__int64 v25; // [rsp+38h] [rbp-48h] | |
__int64 v26; // [rsp+40h] [rbp-40h] | |
char v27; // [rsp+48h] [rbp-38h] | |
_QWORD *v28; // [rsp+50h] [rbp-30h] | |
v26 = 32LL; | |
v27 = 3; | |
v21[0] = 0LL; | |
v22 = 0LL; | |
v24 = a1; | |
v25 = a2; | |
v3 = a3[4]; | |
v28 = a3; | |
if ( v3 ) | |
{ | |
v4 = a3[5]; | |
if ( v4 ) | |
{ | |
v5 = a3[2]; | |
v6 = (_QWORD *)(*a3 + 8LL); | |
v20 = 56 * v4; | |
v7 = 0LL; | |
v8 = 0LL; | |
while ( 1 ) | |
{ | |
if ( *v6 && (*(unsigned __int8 (__fastcall **)(__int64, _QWORD))(v25 + 24))(v24, *(v6 - 1)) ) | |
return 1; | |
LODWORD(v26) = *(_DWORD *)(v3 + v7 + 40); | |
v27 = *(_BYTE *)(v3 + v7 + 48); | |
HIDWORD(v26) = *(_DWORD *)(v3 + v7 + 44); | |
v9 = *(_QWORD *)(v3 + v7 + 16); | |
v10 = *(_QWORD *)(v3 + v7 + 24); | |
if ( !v9 ) | |
goto LABEL_11; | |
if ( (_DWORD)v9 == 1 ) | |
{ | |
v10 *= 16LL; | |
if ( !*(_QWORD *)(v5 + v10 + 8) ) | |
break; | |
} | |
v11 = 0LL; | |
LABEL_12: | |
v21[0] = v11; | |
v21[1] = v10; | |
v12 = *(_QWORD *)(v3 + v7); | |
if ( v12 != 2 ) | |
{ | |
v10 = *(_QWORD *)(v3 + v7 + 8); | |
if ( (_DWORD)v12 != 1 ) | |
goto LABEL_17; | |
v10 *= 16LL; | |
if ( !*(_QWORD *)(v5 + v10 + 8) ) | |
{ | |
v10 = *(_QWORD *)(v5 + v10); | |
LABEL_17: | |
v13 = 1LL; | |
goto LABEL_18; | |
} | |
} | |
v13 = 0LL; | |
LABEL_18: | |
v22 = v13; | |
v23 = v10; | |
if ( (*(unsigned __int8 (__fastcall **)(_QWORD, _QWORD *))(v5 + 16LL * *(_QWORD *)(v3 + v7 + 32) + 8))( | |
*(_QWORD *)(v5 + 16LL * *(_QWORD *)(v3 + v7 + 32)), | |
v21) ) | |
{ | |
return 1; | |
} | |
v6 += 2; | |
v7 += 56LL; | |
++v8; | |
if ( v20 == v7 ) | |
return v8 < v28[1] | |
&& (*(unsigned __int8 (__fastcall **)(__int64, _QWORD, _QWORD))(v25 + 24))( | |
v24, | |
*(_QWORD *)(*v28 + 16 * v8), | |
*(_QWORD *)(*v28 + 16 * v8 + 8)); | |
} | |
v10 = *(_QWORD *)(v5 + v10); | |
LABEL_11: | |
v11 = 1LL; | |
goto LABEL_12; | |
} | |
} | |
else | |
{ | |
v14 = a3[3]; | |
if ( v14 ) | |
{ | |
v15 = a3[2]; | |
v16 = *a3; | |
v17 = 16 * v14; | |
v18 = 0LL; | |
v8 = 0LL; | |
while ( (!*(_QWORD *)(v16 + v18 + 8) | |
|| !(*(unsigned __int8 (__fastcall **)(__int64, _QWORD))(v25 + 24))(v24, *(_QWORD *)(v16 + v18))) | |
&& !(*(unsigned __int8 (__fastcall **)(_QWORD, _QWORD *))(v15 + v18 + 8))(*(_QWORD *)(v15 + v18), v21) ) | |
{ | |
v18 += 16LL; | |
++v8; | |
if ( v17 == v18 ) | |
return v8 < v28[1] | |
&& (*(unsigned __int8 (__fastcall **)(__int64, _QWORD, _QWORD))(v25 + 24))( | |
v24, | |
*(_QWORD *)(*v28 + 16 * v8), | |
*(_QWORD *)(*v28 + 16 * v8 + 8)); | |
} | |
return 1; | |
} | |
} | |
v8 = 0LL; | |
return v8 < v28[1] | |
&& (*(unsigned __int8 (__fastcall **)(__int64, _QWORD, _QWORD))(v25 + 24))( | |
v24, | |
*(_QWORD *)(*v28 + 16 * v8), | |
*(_QWORD *)(*v28 + 16 * v8 + 8)); | |
} | |
//----- (00000000000018F0) ---------------------------------------------------- | |
__int64 core::panicking::panic_fmt() | |
{ | |
rust_begin_unwind(); | |
return core::fmt::Write::write_fmt(); | |
} | |
// 18F0: using guessed type __int64 core::panicking::panic_fmt(); | |
// 18F9: using guessed type __int64 core::fmt::Write::write_fmt(void); | |
// 1A60: using guessed type __int64 rust_begin_unwind(void); | |
//----- (00000000000018F9) ---------------------------------------------------- | |
bool __fastcall core::fmt::Write::write_fmt(__int64 a1, _QWORD *a2) | |
{ | |
return core::fmt::write(a1, (__int64)&unk_2B40, a2); | |
} | |
//----- (0000000000001915) ---------------------------------------------------- | |
bool __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_str( | |
_DWORD *a1, | |
const void *a2, | |
size_t a3) | |
{ | |
__int64 v4; // rax | |
size_t v5; // r15 | |
v4 = (unsigned int)*a1; | |
v5 = 1024 - v4; | |
if ( 1024 - v4 >= a3 ) | |
{ | |
memcpy((char *)a1 + v4 + 4, a2, a3); | |
*a1 += a3; | |
} | |
return v5 < a3; | |
} | |
//----- (000000000000194F) ---------------------------------------------------- | |
char __fastcall <arrayvec::array_string::ArrayString<_> as core::fmt::Write>::write_char(_DWORD *a1, unsigned int a2) | |
{ | |
__int64 v2; // rcx | |
unsigned __int64 v3; // rdx | |
char result; // al | |
int v5; // [rsp-8h] [rbp-8h] | |
v2 = (unsigned int)*a1; | |
if ( v2 != 1024 && a2 < 0x80 ) | |
{ | |
*((_BYTE *)a1 + v2 + 4) = a2; | |
v5 = 1; | |
} | |
else | |
{ | |
v3 = 1024LL - (unsigned int)*a1; | |
if ( v3 >= 2 && a2 < 0x800 ) | |
{ | |
*((_BYTE *)a1 + v2 + 4) = (a2 >> 6) | 0xC0; | |
*((_BYTE *)a1 + v2 + 5) = a2 & 0x3F | 0x80; | |
v5 = 2; | |
} | |
else if ( v3 >= 3 && a2 < 0x10000 ) | |
{ | |
*((_BYTE *)a1 + v2 + 4) = (a2 >> 12) | 0xE0; | |
*((_BYTE *)a1 + v2 + 5) = (a2 >> 6) & 0x3F | 0x80; | |
*((_BYTE *)a1 + v2 + 6) = a2 & 0x3F | 0x80; | |
v5 = 3; | |
} | |
else | |
{ | |
result = 1; | |
if ( v3 <= 3 ) | |
return result; | |
*((_BYTE *)a1 + v2 + 4) = (a2 >> 18) | 0xF0; | |
*((_BYTE *)a1 + v2 + 5) = (a2 >> 12) & 0x3F | 0x80; | |
*((_BYTE *)a1 + v2 + 6) = (a2 >> 6) & 0x3F | 0x80; | |
*((_BYTE *)a1 + v2 + 7) = a2 & 0x3F | 0x80; | |
v5 = 4; | |
} | |
} | |
*a1 = v5 + v2; | |
return 0; | |
} | |
//----- (0000000000001A31) ---------------------------------------------------- | |
__int64 init() | |
{ | |
core::panicking::panic_fmt(); | |
return rust_begin_unwind(); | |
} | |
// 18F0: using guessed type __int64 core::panicking::panic_fmt(void); | |
// 1A31: using guessed type __int64 init(); | |
// 1A60: using guessed type __int64 rust_begin_unwind(void); | |
//----- (0000000000001A60) ---------------------------------------------------- | |
__int64 __fastcall rust_begin_unwind(__int64 a1) | |
{ | |
__int64 v2; // [rsp+8h] [rbp-450h] BYREF | |
_QWORD v3[2]; // [rsp+10h] [rbp-448h] BYREF | |
_QWORD v4[6]; // [rsp+20h] [rbp-438h] BYREF | |
unsigned int v5; // [rsp+54h] [rbp-404h] BYREF | |
_BYTE v6[1024]; // [rsp+58h] [rbp-400h] BYREF | |
v2 = a1; | |
v5 = 0; | |
v3[0] = &v2; | |
v4[0] = &off_2B80; | |
v4[1] = 2LL; | |
v4[4] = 0LL; | |
v3[1] = <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt; | |
v4[2] = v3; | |
v4[3] = 1LL; | |
core::fmt::Write::write_fmt((__int64)&v5, v4); | |
gr_panic(v6, v5); | |
return <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt(); | |
} | |
// 1AC5: using guessed type __int64 <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt(void); | |
// 2B80: using guessed type char *off_2B80; | |
// 3D98: using guessed type __int64 __fastcall gr_panic(_QWORD, _QWORD); | |
//----- (0000000000001AC5) ---------------------------------------------------- | |
bool __fastcall <core::panic::panic_info::PanicMessage as core::fmt::Display>::fmt(_OWORD **a1, __int64 a2) | |
{ | |
__int128 v2; // xmm1 | |
__int128 v3; // xmm2 | |
_OWORD v5[3]; // [rsp+0h] [rbp-38h] BYREF | |
v2 = (*a1)[1]; | |
v3 = (*a1)[2]; | |
v5[0] = **a1; | |
v5[2] = v3; | |
v5[1] = v2; | |
return core::fmt::write(*(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 40), v5); | |
} | |
//----- (0000000000001B10) ---------------------------------------------------- | |
void sub_1B10() | |
{ | |
JUMPOUT(0LL); | |
} | |
// 1B16: control flows out of bounds to 0 | |
// nfuncs=20 queued=15 decompiled=15 lumina nreq=0 worse=0 better=0 | |
// ALL OK, 15 function(s) have been successfully decompiled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment