joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140edc058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140edc1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140edc089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140edc06f
add dl, dl
jne 0x140edc096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140edc0f6
xor eax, eax
add dl, dl
jne 0x140edc0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140edc1ad
add dl, dl
jne 0x140edc0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140edc0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140edc0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140edc0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140edc0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140edc07e
mov eax, 1
add dl, dl
jne 0x140edc106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140edc113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140edc0fb
sub eax, ebx
mov ebx, 1
jne 0x140edc14c
mov ecx, 1
add dl, dl
jne 0x140edc12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140edc13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140edc123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140edc07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140edc168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140edc175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140edc15d
cmp eax, 0x7d00
jae 0x140edc19b
cmp eax, 0x500
jb 0x140edc196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140edc07e
cmp eax, 0x7f
ja 0x140edc19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140edc07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140edc1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140edc07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0049a190]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0049a1a0]
mov dword [rax], 1
mov rax, qword [0x0049a1b0]
mov dword [rax], 1
mov rax, qword [0x0049a180]
mov dword [rax], 1
mov rax, qword [0x00499ed0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0049a170]
mov dword [0x004a400c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x0049a050]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00499e40]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067
Function at 0x430600
Capabilities:
Read file on windows

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rdi, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x90]
mov r13d, edx
mov r14, rcx
mov rdx, r8
xor r8d, r8d
mov ecx, r13d
mov rbx, r9
call dbg.lseek64
test rax, rax
js 0x4306c0
mov rdx, rbx
mov r9, r12
mov r8, rdi
mov rcx, r14
call sym.backtrace_alloc
mov qword [rsi + 8], rax
mov rdx, rax
test rax, rax
je 0x4306f2
mov qword [rsi], rax
mov r8d, ebx
mov ecx, r13d
mov qword [rsi + 0x10], rbx
call sym.read
test eax, eax
js 0x4306e0
cdqe
mov r8d, 1
cmp rax, rbx
jb 0x4306a0
mov eax, r8d
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
xor r8d, r8d
lea rdx, str.file_too_short
mov rcx, r12
call rdi
mov rcx, qword [rsi + 8]
call sym.free
xor r8d, r8d
jmp 0x430685
call qword [sym.imp.msvcrt.dll__errno]
lea rdx, str.lseek
mov rcx, r12
mov r8d, dword [rax]
call rdi
xor r8d, r8d
jmp 0x430685
call qword [sym.imp.msvcrt.dll__errno]
lea rdx, str.read
mov r8d, dword [rax]
jmp 0x4306aa
xor r8d, r8d
jmp 0x430685

Function at 0x4358a0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x435910
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004a5474]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x435ab8
mov rax, qword [0x004a5478]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x43595c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4359e7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x435940
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x435af2
mov rax, qword [0x004a5478]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004a5478]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x435b01
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4359e0
sub eax, 4
and eax, 0xfffffffb
jne 0x435a70
add dword [0x004a5474], 1
cmp ebx, 8
jae 0x435a18
test bl, 4
jne 0x435ac0
test ebx, ebx
je 0x435a09
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x435ae0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x435a09
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x435a4a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x004a5478]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4359e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor edi, edi
jmp 0x435967
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x435a09
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x435a09
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004a5478]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x4362e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004a5760]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004a5740]
test rbx, rbx
je 0x436334
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x43632b
test r12, r12
je 0x43632b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x436310
lea rcx, [0x004a5760]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x436590
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x4365a0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x4365b0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4365f5
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x4365ec
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4365f7
add rax, 0x28
cmp rax, r9
jne 0x4365d8
xor eax, eax
ret

Function at 0x4366a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00499ed0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x436719
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x436719
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x436716
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x43670d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x436719
add r8, 0x28
cmp r8, r9
jne 0x4366f8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x436800
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00499ed0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x43686f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x43686f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x43686d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x436864
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x436878
add rax, 0x28
cmp rax, r9
jne 0x436850
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x436890
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00499ed0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x436908
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x436908
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x436908
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x436908
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x4368fc
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x436910
add rdx, 0x28
cmp rdx, r10
jne 0x4368e8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x436920
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x43692e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x436905
test r8d, r8d
jg 0x436918
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x4453c0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rbx
test rax, rax
je 0x445408
mov rcx, r12
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop r12
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rbx
mov qword [0x004a61c0], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x4453ef
Function at 0x44cd80
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1b8
mov rax, qword [0x00499e30]
lea r12, [0x00489f20]
mov eax, dword [rax]
mov rdi, rcx
test eax, eax
jne 0x44cf5a
movsx rsi, byte [rdi + 0x1c]
mov rbx, qword [rdi]
test rsi, rsi
jle 0x44ce25
lea rcx, [rdi + 0x28]
xor edx, edx
lea r10, [rsp + 0x30]
lea r9, [rsp + 0x130]
lea r8, [rsp + 0xb0]
jmp 0x44cded
add rdx, 1
add rcx, 0x18
cmp rsi, rdx
je 0x44ce25
mov rax, qword [rcx]
mov qword [r10 + rdx*8], 0
mov qword [r9 + rdx*8], rax
mov rax, qword [rcx + 0x10]
add rax, 1
sub rax, qword [rcx + 8]
mov qword [r8 + rdx*8], rax
test rax, rax
jg 0x44cde0
add rsp, 0x1b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [r12], 0
mov rdi, qword [rsp + 0x130]
je 0x44cf67
test rbx, rbx
je 0x44ce11
mov r13, qword [rsp + 0xb0]
lea r15, [rdi*4]
movsxd rax, dword [r12 + 4]
mov rdx, qword [rsp + 0x30]
movss xmm1, dword [0x00492418]
imul rdi, r13
mov r10, qword [r12 + rax*8 + 8]
mov rbp, rax
mov qword [rsp + 0x28], rdi
lea eax, [rbp + 1]
pxor xmm0, xmm0
add rdx, 1
movabs rdi, 0x106689d45497fdb5
mov ebp, eax
and eax, 0xf
lea rcx, [r12 + rax*8]
and ebp, 0xf
mov rax, qword [rcx + 8]
mov r8, rax
shl r8, 0x1f
xor rax, r8
mov r8, r10
shr r8, 0x1e
xor r8, rax
shr rax, 0xb
xor r10, r8
xor r10, rax
mov rax, r10
mov qword [rcx + 8], r10
imul rax, rdi
shr rax, 0x20
and eax, 0xffffff00
cvtsi2ss xmm0, rax
mulss xmm0, xmm1
movss dword [rbx], xmm0
add rbx, r15
cmp rdx, r13
jne 0x44ce70
cmp rsi, 1
je 0x44cf50
mov r9, qword [rsp + 0x28]
lea rcx, [rsp + 0x38]
mov edx, 1
lea rdi, [rsp + 0x130]
lea r11, [rsp + 0xb0]
jmp 0x44cf23
imul r8, rax
add rdx, 1
mov qword [rcx], 0
add rcx, 8
mov r9, r8
cmp rsi, rdx
je 0x44cf50
mov r8, qword [rdi + rdx*8]
mov rax, qword [rcx]
mov r14, r8
add rax, 1
sub r14, r9
mov qword [rcx], rax
lea rbx, [rbx + r14*4]
cmp rax, qword [r11 + rdx*8]
je 0x44cf08
xor edx, edx
jmp 0x44ce70
mov dword [r12 + 4], ebp
jmp 0x44ce11
call fcn.0046aef0
mov r12, rax
jmp 0x44cdae
xor edx, edx
mov rcx, r12
call fcn.0046b1d0
jmp 0x44ce38
Function at 0x44fd10
Capabilities:
Delete file

Disassembly:
push r14
push r13
push r12
push rbx
sub rsp, 0x38
mov ebx, 2
mov r12, rcx
call sym._gfortrani_library_start
test byte [r12], 0x80
jne 0x44fda8
mov ecx, dword [r12 + 4]
call sym._gfortrani_find_unit
mov r13, rax
test byte [r12], 3
jne 0x44fd98
test rax, rax
je 0x44fd98
mov rcx, rax
call sym._gfortrani_close_share
test eax, eax
js 0x44fe38
cmp dword [r13 + 0x58], 3
je 0x44fdd8
test ebx, ebx
jne 0x44fd81
mov eax, dword [r13 + 0x84]
test eax, eax
je 0x44fdf8
lea rdx, str.STATUS_set_to_DELETE_on_CLOSE_but_file_protected_by_READONLY_specifier
mov rcx, r12
call sym._gfortrani_generate_warning
mov rcx, r13
add rsp, 0x38
pop rbx
pop r12
pop r13
pop r14
jmp sym._gfortrani_close_unit
add rsp, 0x38
pop rbx
pop r12
pop r13
pop r14
ret
lea rax, str.Bad_STATUS_parameter_in_CLOSE_statement
mov rdx, qword [r12 + 0x30]
mov r8, qword [r12 + 0x38]
mov rcx, r12
mov qword [rsp + 0x20], rax
lea r9, str.keep
call sym._gfortrani_find_option
mov ebx, eax
jmp 0x44fd2f
cmp ebx, 1
jne 0x44fdf8
lea r8, str.Cant_KEEP_a_scratch_file_on_CLOSE
mov edx, 0x138a
mov rcx, r12
call sym._gfortran_generate_error
nop dword [rax]
mov rcx, qword [r13 + 0x108]
call sym.strdup
mov rcx, r13
mov r14, rax
call sym._gfortrani_close_unit
test r14, r14
je 0x44fd98
mov rcx, r14
call sym.remove
test eax, eax
jne 0x44fe58
mov rcx, r14
add rsp, 0x38
pop rbx
pop r12
pop r13
pop r14
jmp sym.free
lea r8, str.Problem_in_CLOSE
mov edx, 0x1388
mov rcx, r12
call sym._gfortran_generate_error
jmp 0x44fd58
lea r8, str.File_cannot_be_deleted
mov edx, 0x1388
mov rcx, r12
call sym._gfortran_generate_error
jmp 0x44fe20
Function at 0x465c00
Capabilities:
Execute command

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [rsp + 0x80]
mov r14, qword [rsp + 0x90]
mov esi, edx
mov rdx, qword [rsp + 0x88]
mov rdi, r8
mov rbx, r9
call sym._gfortrani_fc_strdup
mov r12, rax
call sym._gfortrani_flush_all_units
mov rcx, r12
call sym.system
cmp eax, 0xffffffff
je 0x465c98
test sil, sil
jne 0x465c80
test rbx, rbx
je 0x465cf8
mov dword [rbx], 0xfffffffe
mov dword [rdi], eax
mov rcx, r12
call sym.free
movsxd rax, dword [rbx]
test eax, eax
jle 0x465c71
test r13, r13
jne 0x465cc0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
lea edx, [rax - 0x7e]
cmp edx, 1
jbe 0x465cb0
test rbx, rbx
je 0x465cf8
mov dword [rbx], 0
jmp 0x465c5b
test rbx, rbx
je 0x465d10
mov dword [rbx], 1
mov rcx, r12
call sym.free
jmp 0x465c65
test rbx, rbx
je 0x465d20
mov dword [rbx], 3
jmp 0x465c5b
lea rdx, [0x0049a5e0]
mov rbx, qword [rdx + rax*8]
mov rcx, rbx
call sym.strlen
mov r8, rbx
mov rdx, r14
mov rcx, r13
mov r9, rax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
jmp sym._gfortrani_fstrcpy
mov rcx, r12
mov dword [rdi], eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
jmp sym.free
mov ecx, 1
call fcn.00485720
nop word [rax + rax]
mov ecx, 3
call fcn.00485720
nop
nop
nop
nop
nop
nop

Function at 0x46aef0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
mov r12d, dword [0x00489fc0]
mov rbx, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbx
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r12, r12
je 0x46af38
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
mov edx, 0x88
mov ecx, 1
call sym._gfortrani_xcalloc
mov ecx, dword [0x00489fc0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x46af26
call rbx
jmp 0x46af26
Function at 0x482b70
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [sym.imp.msvcrt.dll__errno]
mov ebp, 0x7ffff000
mov rdi, rcx
mov rsi, rdx
mov r12, r8
mov rbx, r8
cmp r8, 0x7ffff000
jle 0x482c00
nop dword [rax]
cmp rbx, 0x7ffff000
mov r8, rbp
mov ecx, dword [rdi + 0x38]
mov rdx, rsi
cmovle r8, rbx
call sym.read
movsxd rdx, eax
cmp eax, 0xffffffff
je 0x482be0
sub rbx, rdx
add rsi, rdx
test rbx, rbx
jg 0x482ba0
mov rax, r12
sub rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call r13
cmp dword [rax], 4
je 0x482ba0
mov rax, 0xffffffffffffffff
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rbx, r13
mov ecx, dword [rdi + 0x38]
mov r8d, r12d
mov rdx, rsi
call sym.read
mov r8d, eax
cdqe
cmp r8d, 0xffffffff
jne 0x482bd2
call rbx
cmp dword [rax], 4
je 0x482c03
mov rax, 0xffffffffffffffff
jmp 0x482bef

Function at 0x482d40
Capabilities:
Clear file content

Disassembly:
push r14
push r13
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov ecx, dword [rcx + 0x38]
mov r14, rdx
call sym.isatty
test eax, eax
jne 0x482e08
mov ecx, dword [rbx + 0x38]
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x482e08
mov ecx, dword [rbx + 0x38]
mov r8d, 1
xor edx, edx
call dbg.lseek64
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x482e20
mov ecx, dword [rbx + 0x38]
xor r8d, r8d
mov rdx, r14
call dbg.lseek64
cmp rax, 0xffffffffffffffff
je 0x482dec
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x482de0
mov ecx, dword [rbx + 0x38]
xor r8d, r8d
mov rdx, r13
call dbg.lseek64
cmp rax, 0xffffffffffffffff
sete al
movzx eax, al
neg eax
add rsp, 0x28
pop rbx
pop r12
pop r13
pop r14
ret
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 9
mov ecx, dword [rbx + 0x38]
xor r8d, r8d
mov rdx, r13
call dbg.lseek64
mov eax, 0xffffffff
jmp 0x482dcf
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 9
mov eax, 0xffffffff
jmp 0x482dcf
mov eax, 0xffffffff
jmp 0x482dcf

Function at 0x485260
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
mov rax, qword [0x00499e30]
mov eax, dword [rax]
test eax, eax
jne 0x4852a0
cmp byte [0x00489fe0], 0
jne 0x485309
mov byte [0x00489fe0], 1
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
mov r13d, dword [0x00489ff0]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov r12d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r12d
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x4852e0
cmp byte [rbx], 0
jne 0x485309
mov byte [rbx], 1
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
mov edx, 1
mov ecx, 1
call sym._gfortrani_xcalloc
mov ecx, dword [0x00489ff0]
mov rbx, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4852cd
call rsi
jmp 0x4852cd
call sym._gfortrani_sys_abort
nop
nop
Function at 0x485e50
Capabilities:
Get common file path
Query environment variable

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x148
mov rbx, rcx
lea rcx, str.TMPDIR
lea r13, [rsp + 0x28]
mov rsi, rdx
call sym.getenv
mov rdx, r13
mov rcx, rax
call fcn.00485f10
mov r12d, eax
cmp eax, 0xffffffff
je 0x485eb0
mov rcx, qword [rsp + 0x28]
mov qword [rsi], rcx
call sym.strlen
mov qword [rbx], rax
mov eax, r12d
add rsp, 0x148
pop rbx
pop rsi
pop r12
pop r13
ret
lea r12, [rsp + 0x30]
mov ecx, 0x104
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [rax - 1]
cmp edx, 0x103
ja 0x485f08
mov eax, eax
mov byte [rsp + rax + 0x30], 0
mov rcx, r12
call sym.strdup
mov rdx, r13
mov rcx, rax
call fcn.00485f10
mov r12d, eax
cmp eax, 0xffffffff
jne 0x485e87
mov rdx, r13
lea rcx, [0x00491e30]
call fcn.00485f10
mov r12d, eax
jmp 0x485e87
mov byte [rsp + 0x30], 0
jmp 0x485ed5

Function at 0x487ed0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0049a100]
mov eax, dword [rax + 0x2c]
cmp eax, 1
je 0x460ddd
cmp eax, 0xffffffff
jne 0x487ec0
mov rax, qword [0x0049a060]
cmp dword [rax + 0x10], 1
jne 0x487ec0
lea rcx, str._nProgram_aborted._Backtrace:_n
call sym._gfortrani_estr_write
xor ecx, ecx
call sym._gfortrani_show_backtrace
xor edx, edx
mov ecx, 0x16
call sym.signal
nop
jmp 0x487ec0
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub rsp, 0x28
mov rax, qword [0x00499e30]
mov eax, dword [rax]
test eax, eax
jne 0x487ee6
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x487f09
lea rdx, [sym.free]
mov dword [0x00489ff0], eax
add rsp, 0x28
jmp dbg.__mingwthr_key_dtor
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]