joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140009a90
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x150
mov rax, qword [0x140045008]
xor rax, rsp
mov qword [rsp + 0x140], rax
xor ebx, ebx
lea r8, [rsp + 0x30]
mov r12, rdx
mov r14, rcx
mov r13d, 0x400
mov ebp, ebx
mov ecx, r13d
mov edi, ebx
lea esi, [rbx + 4]
mov r9d, esi
lea edx, [rbx + 0xe]
lea r15d, [rbx + 1]
call qword [sym.imp.api_ms_win_core_localization_l1_2_1.dll_GetLocaleInfoW]
test eax, eax
jne 0x140009afe
lea r8, [0x14003c718]
mov edx, esi
lea rcx, [rsp + 0x30]
call qword [sym.imp.msvcrt.dll_wcscpy_s]
mov rsi, r14
cmp r14, r13
jb 0x140009b1f
cmp edi, 4
jae 0x140009b1f
mov ebp, esi
add edi, r15d
and ebp, 0x3ff
shr rsi, 0xa
cmp rsi, r13
jae 0x140009b06
test edi, edi
je 0x140009b53
sub edi, r15d
je 0x140009b4c
sub edi, r15d
je 0x140009b45
sub edi, r15d
je 0x140009b3e
cmp edi, r15d
jne 0x140009b53
mov edx, 0x324
jmp 0x140009b60
mov edx, 0x323
jmp 0x140009b60
mov edx, 0x322
jmp 0x140009b60
mov edx, 0x321
jmp 0x140009b60
mov rsi, r14
mov ebp, ebx
mov r15d, ebx
mov edx, 0x325
mov rcx, qword [0x140045860]
lea r8, [rsp + 0xc0]
mov edi, 0x40
mov r9d, edi
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadStringW]
test eax, eax
jne 0x140009b97
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140009c02
lea rcx, [rsp + 0x40]
mov r9, rsi
mov rdx, rdi
test r15d, r15d
je 0x140009c2f
imul eax, ebp, 0x64
lea r8, str._I64u_s_02d
shr eax, 0xa
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.msvcrt.dll_swprintf_s]
test eax, eax
jle 0x140009bfd
lea r8, [rsp + 0x40]
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.msvcrt.dll_wcscpy_s]
test eax, eax
jne 0x140009bfd
lea r8, [rsp + 0xc0]
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.msvcrt.dll_wcscat_s]
test eax, eax
je 0x140009c02
mov ebx, 0x80004005
mov eax, ebx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140039130
mov rbx, qword [rsp + 0x1a0]
add rsp, 0x150
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, str._I64u
call qword [sym.imp.msvcrt.dll_swprintf_s]
jmp 0x140009bcc
Function at 0x140015ad4
Capabilities:
Access peb ldr_data

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
push rdi
sub rsp, 0x40
mov rax, qword gs:[0x58]
mov rdi, rcx
mov ecx, 8
mov esi, r9d
mov rbp, r8
mov rbx, rdx
mov r10, qword [rax]
lea rax, str.TieringJetDatabase::Initialize
mov qword [rcx + r10], rax
lea rcx, [r11 - 0x18]
call fcn.140008d4c
mov rax, qword [rsp + 0x70]
mov qword [rdi + 0x68], rax
mov qword [rdi], rbx
mov dword [rdi + 0x60], esi
mov qword [rdi + 0x70], rbp
cmp esi, 1
jne 0x140015b3a
lea rax, str.TieringEngineHeat
jmp 0x140015b4a
cmp esi, 2
jne 0x140015be3
lea rax, str.TieringPinnedFiles
mov rcx, qword [rdi + 0x50]
xor esi, esi
mov qword [rdi + 0x58], rax
test rcx, rcx
je 0x140015b61
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ResetEvent]
jmp 0x140015bd6
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_CreateEventW]
mov rbx, rax
test rax, rax
jne 0x140015bd2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx r8d, ax
or r8d, 0x80070000
test eax, eax
cmovle r8d, eax
mov dword [rsp + 0x38], r8d
mov rcx, qword [0x140045158]
lea rax, [0x140045158]
cmp rcx, rax
je 0x140015bd2
test byte [rcx + 0x1c], 1
je 0x140015bd2
cmp byte [rcx + 0x19], 2
jb 0x140015bd2
mov r9, qword [rdi + 0x70]
lea edx, [rbx + 0x3d]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], r8d
lea r8, [0x14003ce68]
call fcn.1400042f4
mov qword [rdi + 0x50], rbx
mov word [rdi + 0x4c], si
mov byte [rdi + 0x9c], 1
jmp 0x140015c2e
mov ebx, 0x8009300f
mov dword [rsp + 0x38], ebx
mov rcx, qword [0x140045158]
lea rax, [0x140045158]
cmp rcx, rax
je 0x140015c2c
test byte [rcx + 0x1c], 1
je 0x140015c2c
cmp byte [rcx + 0x19], 2
jb 0x140015c2c
mov rcx, qword [rcx + 0x10]
lea r8, [0x14003ce68]
mov edx, 0x3c
mov dword [rsp + 0x28], ebx
mov r9d, esi
mov qword [rsp + 0x20], rbp
call fcn.140012fd8
mov esi, ebx
lea rcx, [rsp + 0x30]
call fcn.140008b88
mov rbx, qword [rsp + 0x50]
mov eax, esi
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
Function at 0x140038e80
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r12
push r14
push r15
sub rsp, 0xb0
xor r15d, r15d
mov dword [rsp + 0x20], r15d
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
mov r14d, r15d
xor eax, eax
lock cmpxchg qword [0x140045cc8], rbx
je 0x140038ee9
cmp rax, rbx
jne 0x140038edc
mov edi, 1
mov r14d, edi
jmp 0x140038eee
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x140038ec0
mov edi, 1
mov eax, dword [0x140045cd0]
cmp eax, edi
jne 0x140038f06
mov esi, 0x1f
mov ecx, esi
call sub.msvcrt.dll__amsg_exit
jmp 0x140038f77
mov eax, dword [0x140045cd0]
test eax, eax
jne 0x140038f6c
mov dword [0x140045cd0], edi
lea r12, [0x14003b7c8]
lea rbx, [0x14003b7b0]
mov qword [rsp + 0x30], rbx
mov eax, r15d
mov dword [rsp + 0x24], eax
cmp rbx, r12
jae 0x140038f5e
test eax, eax
jne 0x140038f62
mov rsi, qword [rbx]
test rsi, rsi
je 0x140038f53
mov rcx, rsi
mov rax, qword [fcn.140003d10]
call rax
call rsi
mov dword [rsp + 0x24], eax
add rbx, 8
mov qword [rsp + 0x30], rbx
jmp 0x140038f30
test eax, eax
je 0x140038f72
mov eax, 0xff
jmp 0x1400390d3
mov dword [0x140045284], edi
mov esi, 0x1f
mov eax, dword [0x140045cd0]
cmp eax, edi
jne 0x140038f9e
lea rdx, [0x14003b7a8]
lea rcx, [0x14003b778]
call sub.msvcrt.dll__initterm
mov dword [0x140045cd0], 2
test r14d, r14d
jne 0x140038fad
mov rax, r15
xchg qword [0x140045cc8], rax
cmp qword [0x140045ce8], r15
je 0x140038fe4
lea rcx, [0x140045ce8]
call fcn.1400394d0
test eax, eax
je 0x140038fe4
mov rbx, qword [0x140045ce8]
mov rcx, rbx
mov rax, qword [fcn.140003d10]
call rax
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call rbx
mov rax, qword [sym.imp.msvcrt.dll__wcmdln]
mov rdx, qword [rax]
test rdx, rdx
jne 0x140038ffd
mov eax, 0xff
jmp 0x1400390d3
mov qword [rsp + 0x28], rdx
mov ecx, dword [rsp + 0x20]
cmp word [rdx], 0x20
ja 0x140039084
cmp word [rdx], r15w
je 0x140039016
test ecx, ecx
jne 0x140039084
movzx eax, word [rdx]
sub ax, di
cmp ax, si
ja 0x14003902c
add rdx, 2
mov qword [rsp + 0x28], rdx
jmp 0x140039016
mov ecx, dword [rsp + 0x7c]
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
and cl, dil
cmovne r9d, eax
mov r8, rdx
xor edx, edx
lea rcx, [0x140000000]
call fcn.140002104
mov dword [0x140045280], eax
cmp dword [0x1400452a0], r15d
jne 0x14003906d
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140045284], r15d
jne 0x140039082
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140045280]
jmp 0x1400390d3
cmp word [rdx], 0x22
jne 0x140039098
mov eax, r15d
test ecx, ecx
sete al
mov ecx, eax
mov dword [rsp + 0x20], eax
add rdx, 2
mov qword [rsp + 0x28], rdx
jmp 0x140039006
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r12
ret
sub rsp, 0x28
call fcn.1401b9000
add rsp, 0x28
jmp 0x140038e80
Function at 0x1400393cc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140039418
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140039410
cmp dword [rcx + 0x3c], edx
jl 0x140039410
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140039410
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140039418
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x1400fb490]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x1400fb4a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call fcn.1400ddb70
jmp 0x14000123c
mov rax, qword [0x1400fb4a0]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x1400fb4a0]
mov dword [rax], 1
mov rax, qword [0x1400fb4e0]
mov rdx, rax
mov rax, qword [0x1400fb4d0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x14000123c
mov dword [0x1400ff024], 1
mov rax, qword [0x1400fb4a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x1400fb4c0]
mov rdx, rax
mov rax, qword [0x1400fb4b0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov rax, qword [0x1400fb4a0]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x1400fb490]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x1400fb3e0]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x1400fb3e0]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call fcn.1400dcdf8
mov rax, qword [0x1400fb520]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x1400fb480]
mov qword [rdx], rax
lea rax, section..text
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.1400dc5f0
mov eax, dword [0x1400ff004]
lea rdx, [0x1400ff008]
mov ecx, eax
call fcn.14000147c
call fcn.1400dc387
mov rax, qword [0x1400fb410]
mov rax, qword [rax]
mov rdx, qword [0x1400ff010]
mov qword [rax], rdx
mov rcx, qword [0x1400ff010]
mov rdx, qword [0x1400ff008]
mov eax, dword [0x1400ff004]
mov r8, rcx
mov ecx, eax
call fcn.1400016d0
mov dword [0x1400ff01c], eax
mov eax, dword [0x1400ff020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x1400ff01c]
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov eax, dword [0x1400ff024]
test eax, eax
jne 0x14000136c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x1400ff01c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400fb440]
mov dword [rax], 1
mov rax, qword [0x1400fb450]
mov dword [rax], 1
mov rax, qword [0x1400fb460]
mov dword [rax], 1
mov rax, qword [0x1400fb400]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400dc600
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.1400dd960
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x1400dd2d2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400ff168]
test eax, eax
je 0x1400dd36a
lea rax, [0x1400ff140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400ff170]
mov qword [rbp - 8], rax
jmp 0x1400dd34e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400dd342
cmp qword [rbp - 0x10], 0
je 0x1400dd342
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400dd308
lea rax, [0x1400ff140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400dd36b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400dd470
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400dd498
mov eax, 0
jmp 0x1400dd4e6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400dd4c1
mov eax, 0
jmp 0x1400dd4e6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400dd4e1
mov eax, 0
jmp 0x1400dd4e6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x1400dd4ec
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x1400dd56a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400dd561
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x1400dd561
mov rax, qword [rbp - 8]
jmp 0x1400dd57f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x1400dd534
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140104260]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140104270]
mov dword [rax], 1
mov rax, qword [0x140104280]
mov dword [rax], 1
mov rax, qword [0x140104250]
mov dword [rax], 1
mov rax, qword [0x1401040c0]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x140104240]
mov dword [0x140131020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010c0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1401041f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1401041d0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1401034e0]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067
Function at 0x140010600
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 0x140010670
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1401310c4]
mov r12, rcx
test ebx, ebx
jle 0x1400107a0
mov rax, qword [0x1401310c8]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x1400106bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140010745
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x1400106a0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x1400107c2
mov rax, qword [0x1401310c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401310c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400107a7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14001073e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140010750
add dword [0x1401310c4], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x1401310c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001073e
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 ebx, ebx
jmp 0x1400106c8
mov rax, qword [0x1401310c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140010c90
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x140131120]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140131100]
test rbx, rbx
je 0x140010cec
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140010ce3
test r12, r12
je 0x140010ce3
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010cc8
mov rcx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140010f20
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140010f38
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140010f40
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140010f50
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 0x140010f95
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 0x140010f8c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x140010f97
add rax, 0x28
cmp rax, r9
jne 0x140010f78
xor eax, eax
ret

Function at 0x140010fa0
Capabilities:
Parse pe header

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call sym.strlen
cmp rax, 8
ja 0x140011030
mov rdx, qword [0x1401040c0]
xor r12d, r12d
cmp word [rdx], 0x5a4d
jne 0x14001101e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14001101e
cmp word [rax + 0x18], 0x20b
jne 0x14001101e
movzx edx, word [rax + 0x14]
lea r12, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x140011030
sub eax, 1
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8 + 0x28]
jmp 0x140011009
add r12, 0x28
cmp r12, rsi
je 0x140011030
mov r8d, 8
mov rdx, rbx
mov rcx, r12
call sym.strncmp
test eax, eax
jne 0x140011000
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret

Function at 0x140011040
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1401040c0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140011060
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140011068
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140011060
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x1400110b5
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400110ac
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140011060
add rax, 0x28
cmp rax, r9
jne 0x140011098
xor eax, eax
ret

Function at 0x1400110c0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401040c0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x1400110e0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400110e8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400110e0
movzx r8d, word [rax + 6]
mov eax, r8d
ret