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

Disassembly:
push rbx
mov eax, 0x4020
call fcn.0040da00
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
lea rbx, [rsp + 0x20]
call fcn.004080c0
mov r8d, 0x2000
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x406e88
xor eax, eax
add rsp, 0x4020
pop rbx
ret
lea rdx, [rsp + 0x2020]
mov r8d, 0x2000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
xor r8d, r8d
mov rdx, rbx
call fcn.00407ef0
mov rcx, rax
test rax, rax
je 0x406e76
cmp byte [rax], 0
je 0x406e76
call sub.msvcrt.dll__strdup
add rsp, 0x4020
pop rbx
ret

Function at 0x406f30
Capabilities:
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.004080c0
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x406f70
Capabilities:
Create directory
Query environment variable

Disassembly:
push rbp
mov eax, 0x4028
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.004080c0
mov rbx, rax
test rax, rax
je 0x4070b0
lea rdi, [rsp + 0x20]
mov rcx, rax
mov r8d, 0x1000
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
je 0x407090
mov rcx, rdi
call fcn.00408500
test eax, eax
jne 0x407078
mov r8d, 0x1000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov rbp, rax
test rbp, rbp
je 0x4070c0
lea rsi, [rsp + 0x2020]
xor eax, eax
mov ecx, 0x400
mov edx, 0x5c
mov rdi, rsi
rep stosq qword [rdi], rax
mov rcx, rbp
call sub.msvcrt.dll_wcschr
mov rdi, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rbx, rax
test rax, rax
je 0x40705d
nop dword [rax]
mov r8, rbx
mov rdx, rbp
mov rcx, rsi
sub r8, rbp
sar r8, 1
add r8, 1
call sub.msvcrt.dll_wcsncpy
xor edx, edx
mov rcx, rsi
call rdi
lea rcx, [rbx + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
mov rbx, rax
test rax, rax
jne 0x407028
xor edx, edx
mov rcx, rbp
call rdi
mov rax, rbp
add rsp, 0x4028
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wcsdup_1]
mov rbp, rax
jmp 0x406fe7
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
xor ebp, ebp
call fcn.00402b50
mov rax, rbp
add rsp, 0x4028
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
xor ebp, ebp
call fcn.00402b50
jmp 0x40709e
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
xor ebp, ebp
call fcn.00402b50
jmp 0x40709e
Function at 0x4070d0
Capabilities:
Get common file path
Set environment variable

Disassembly:
push r15
mov eax, 0x2048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
mov r15, rcx
mov rdi, rdx
test rdx, rdx
je 0x407139
lea rcx, [0x0041a523]
call fcn.00406e40
mov rcx, rdi
mov r14, rax
call fcn.00406f70
mov rbx, rax
test rax, rax
je 0x4071c3
lea rcx, [0x0041a528]
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
jne 0x4071e0
lea r12, [rsp + 0x40]
mov ecx, 0x1000
lea rbp, [rsp + 0x20]
mov esi, 5
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.msvcrt.dll__getpid
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, rbp
mov r9d, eax
call fcn.00406cd0
mov r13, qword [sym.imp.msvcrt.dll__wtempnam]
mov rcx, r12
mov rdx, rbp
call r13
mov rcx, rax
mov rbx, rax
call fcn.004082f0
test eax, eax
je 0x4071f0
mov rcx, rbx
call sub.msvcrt.dll_free
sub esi, 1
jne 0x407179
test rdi, rdi
je 0x4071c3
test r14, r14
je 0x407238
lea rcx, [0x0041a523]
mov rdx, r14
call fcn.00406ed0
mov rcx, r14
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0x2048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
call fcn.00402b50
jmp 0x4071c3
mov rcx, r15
mov r8d, 0x1000
mov rdx, rbx
call fcn.00407ef0
mov rcx, rbx
call sub.msvcrt.dll_free
test rdi, rdi
je 0x40722a
test r14, r14
je 0x407264
lea rcx, [0x0041a523]
mov rdx, r14
call fcn.00406ed0
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, 1
jmp 0x4071c5
xor r8d, r8d
xor ecx, ecx
lea rdx, [0x0041a523]
call fcn.004080c0
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x4071c3
xor r8d, r8d
xor ecx, ecx
lea rdx, [0x0041a523]
call fcn.004080c0
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x40722a
Function at 0x4072f0
Capabilities:
Delete directory

Disassembly:
push r15
mov eax, 0x44b8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
mov r8d, 0x1000
lea rax, [rsp + 0x24a0]
mov rdx, rcx
lea r12, [rsp + 0x490]
mov rsi, rax
mov rcx, rax
mov qword [rsp + 0x28], rax
call fcn.004080c0
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_wcscpy
mov rcx, r12
call sub.msvcrt.dll_wcslen
mov r13, rax
movzx eax, word [rsp + rax*2 + 0x48e]
cmp ax, 0x2f
je 0x40735c
cmp ax, 0x5c
jne 0x4073b0
lea rdx, [0x0041a5b0]
mov rcx, r12
lea rbx, [rsp + 0x260]
call sub.msvcrt.dll_wcscat
mov rdx, rbx
mov rcx, r12
call fcn.0040e270
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x4073c8
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.msvcrt.dll__wrmdir]
nop
add rsp, 0x44b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [0x0041a5ac]
mov rcx, r12
add r13, 1
call sub.msvcrt.dll_wcscat
jmp 0x40735c
lea rdi, [rsp + 0x30]
mov ecx, 0x46
mov rsi, rbx
mov rdx, r13
rep movsq qword [rdi], qword [rsi]
lea rbp, [rsp + 0x30]
mov rcx, r12
mov r8, rbp
mov r15, rbp
call fcn.00407430
jmp 0x40740f
mov rdi, rbp
mov ecx, 0x46
mov rsi, rbx
mov r8, r15
rep movsq qword [rdi], qword [rsi]
mov rdx, r13
mov rcx, r12
mov rbp, r15
call fcn.00407430
mov rdx, rbx
mov rcx, r14
call fcn.0040e2f0
test eax, eax
je 0x4073f0
mov rcx, r14
call qword [sym.imp.msvcrt.dll__findclose]
jmp 0x407387

Function at 0x407430
Capabilities:
Delete directory
Delete file

Disassembly:
push rbp
mov eax, 0x1038
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
lea rsi, [r8 + 0x24]
mov rbp, rcx
mov rdi, rdx
mov rbx, r8
lea rdx, [0x0041a5b4]
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x407470
add rsp, 0x1038
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rdx, [0x0041a5b8]
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x407461
xor eax, eax
mov rcx, rbp
mov rdx, rsi
mov word [rbp + rdi*2], ax
call sub.msvcrt.dll_wcscat
mov rcx, rbp
test byte [rbx], 0x10
je 0x4074d0
call fcn.00408490
test eax, eax
jne 0x4074f8
lea rbx, [rsp + 0x20]
mov r8d, 0x1000
mov rdx, rbp
mov rcx, rbx
call fcn.00407ef0
mov rcx, rbx
call fcn.004072f0
jmp 0x407461
mov rbx, qword [sym.imp.msvcrt.dll__wremove]
call rbx
test eax, eax
je 0x407461
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbp
call rbx
jmp 0x407461
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__wrmdir]
jmp 0x407461
Function at 0x4076d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rdi
mov eax, 0x1020
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
mov rdi, r8
mov rsi, rdx
lea rdx, [0x0041a644]
call fcn.00404210
mov rdx, rdi
mov rcx, rsi
mov rbx, rax
call fcn.00407510
mov rdi, rax
test rbx, rbx
je 0x4077c9
test rax, rax
je 0x4077bc
lea rsi, [rsp + 0x20]
nop word [rax + rax]
mov rcx, rbx
call sub.msvcrt.dll_feof
test eax, eax
jne 0x4077b8
mov r8d, 0x1000
mov r9, rbx
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
mov r8, rax
test rax, rax
jne 0x407768
mov rcx, rbx
call sub.msvcrt.dll_ferror
test eax, eax
je 0x407720
mov rcx, rbx
call sub.msvcrt.dll_clearerr
jmp 0x407791
mov r9, rdi
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x407789
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x407720
mov rcx, rdi
call sub.msvcrt.dll_clearerr
mov esi, 0xffffffff
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov eax, esi
add rsp, 0x1020
pop rbx
pop rsi
pop rdi
ret
xor esi, esi
jmp 0x407796
test rbx, rbx
je 0x4077c9
mov rcx, rbx
call sub.msvcrt.dll_fclose
test rdi, rdi
je 0x4077d6
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov esi, 0xffffffff
jmp 0x4077a6
Function at 0x407850
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push r12
mov eax, 0x2110
push rbp
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
mov r8d, 0x1000
xor ebx, ebx
lea rsi, [rsp + 0x110]
mov rdx, rcx
lea rbp, [rsp + 0xa0]
mov dword [rsp + 0x5c], 0
mov rcx, rsi
call fcn.004080c0
mov edx, 1
lea rcx, [0x00406cb0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov rcx, rbp
mov dword [rsp + 0x60], 0x18
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x70], 1
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
pxor xmm0, xmm0
mov eax, 1
xor ecx, ecx
movups xmmword [rsp + 0xa8], xmm0
mov r12, qword [fcn.00415d40]
mov qword [rsp + 0xb8], 0
mov dword [rsp + 0xdc], 0x101
mov word [rsp + 0xe0], ax
call r12
mov rcx, rax
call sub.msvcrt.dll__fileno_1
mov rdi, qword [sym.imp.msvcrt.dll__get_osfhandle]
mov ecx, eax
call rdi
mov ecx, 1
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xf0], rax
call r12
mov rcx, rax
call sub.msvcrt.dll__fileno_1
mov ecx, eax
call rdi
mov ecx, 2
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xf8], rax
call r12
mov rcx, rax
call sub.msvcrt.dll__fileno_1
mov ecx, eax
call rdi
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0x100], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
mov qword [rsp + 0x40], rbp
mov rcx, rsi
mov rdx, rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], 0
lea r8, [rsp + 0x60]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4079f8
mov rcx, qword [rsp + 0x80]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x80]
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x5c]
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rdx, str.Error_creating_child_process__n
lea rcx, str.CreateProcessW
call fcn.00402c30
mov eax, 0xffffffff
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x407be0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, rcx
mov ecx, 0x2000
mov rbp, rdx
mov rdi, r8
call sub.msvcrt.dll_malloc
mov rsi, rax
test rax, rax
je 0x407cd0
xor edx, edx
mov r8d, 2
mov rcx, r12
call fcn.0040e570
test eax, eax
js 0x407cd0
mov rcx, r12
call fcn.0040e610
movsxd rbx, eax
cmp rbx, rdi
jb 0x407cd0
mov r15d, 1
sub r15, rdi
mov qword [rsp + 0x28], r15
mov r13d, 0x2000
cmp rbx, r13
cmovae r13, rbx
lea r14, [r13 - 0x2000]
sub rbx, r14
cmp rbx, rdi
jb 0x407cd0
xor r8d, r8d
mov edx, r14d
mov rcx, r12
call fcn.0040e570
test eax, eax
js 0x407cd0
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
cmp rax, rbx
jne 0x407cd0
mov rdx, qword [rsp + 0x28]
lea rbx, [rdx + rax]
jmp 0x407cba
lea r15, [rbx - 1]
mov r8, rdi
mov rdx, rbp
lea rcx, [rsi + r15]
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x407cf0
mov rbx, r15
test rbx, rbx
jne 0x407ca0
lea rbx, [r14 + rdi - 1]
test r14, r14
jne 0x407c49
nop dword [rax]
xor ebx, ebx
mov rcx, rsi
call sub.msvcrt.dll_free
mov rax, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rbx, [r13 + rbx - 0x2001]
jmp 0x407cd2
Function at 0x4082f0
Capabilities:
Create directory

Disassembly:
push r13
mov eax, 0x2068
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040da00
sub rsp, rax
mov rsi, rcx
lea rbp, [rsp + 0x40]
mov qword [rsp + 0x40], 0xffffffffffffffff
mov dword [rsp + 0x3c], 0
mov qword [rsp + 0x60], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4083f0
xor ebx, ebx
lea rdi, [rsp + 0x60]
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x40]
cmp rcx, 0xffffffffffffffff
je 0x408366
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
lea r9, str.S_1_3_4
mov edx, 0x1000
mov rcx, rdi
lea r8, str.D:_A__FA____s_
test rbx, rbx
cmovne r9, rbx
call qword [sym.imp.msvcrt.dll__snwprintf]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r9d, r9d
lea r8, [rsp + 0x48]
mov rcx, rdi
mov dword [rsp + 0x40], 0x18
mov edx, 1
mov dword [rsp + 0x50], 0
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x408480
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
sbb eax, eax
add rsp, 0x2068
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea r12, [rsp + 0x3c]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], r12
mov rdi, qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov edx, 1
call rdi
test eax, eax
jne 0x408426
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x408346
mov edx, dword [rsp + 0x3c]
mov ecx, 1
mov r13, rdx
call sub.msvcrt.dll_calloc
mov rcx, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x408346
mov qword [rsp + 0x20], r12
mov r9d, r13d
mov r8, rax
mov edx, 1
call rdi
lea rdi, [rsp + 0x60]
test eax, eax
je 0x40834d
mov rcx, qword [rbx]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
jmp 0x40834d
mov eax, 0xffffffff
jmp 0x4083d6

Function at 0x408ab0
Capabilities:
Hash data with crc32

Disassembly:
push rsi
push rbx
mov r11d, 0x80000000
test ecx, ecx
je 0x408b2c
mov ebx, 3
lea rsi, [0x0041a900]
jmp 0x408ad7
add ebx, 1
sar ecx, 1
je 0x408b2c
test cl, 1
je 0x408ad0
mov eax, ebx
mov edx, 0x80000000
and eax, 0x1f
mov r10d, dword [rsi + rax*4]
mov eax, r11d
xor r11d, r11d
jmp 0x408b14
mov r9d, eax
shr eax, 1
mov r8d, eax
and r9d, 1
shr edx, 1
xor r8d, 0xedb88320
test r9d, r9d
cmovne eax, r8d
test r10d, edx
je 0x408af8
lea r8d, [rdx - 1]
xor r11d, eax
test r8d, r10d
jne 0x408af8
add ebx, 1
sar ecx, 1
jne 0x408ad7
mov eax, r11d
pop rbx
pop rsi
ret
Function at 0x40cc60
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.00415d40
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00415d40
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x40ccd0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0042f4a4]
test esi, esi
mov rbx, rcx
jle 0x40ce00
mov rax, qword [0x0042f4a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x40cd1b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x40cda5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x40cd00
mov rcx, rbx
call fcn.0040d720
test rax, rax
mov rdi, rax
je 0x40ce22
mov rax, qword [0x0042f4a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.0040d860
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x0042f4a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40ce07
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40cd9e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x40cdb0
add dword [0x0042f4a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x0042f4a8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40cd9e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040cc60
nop dword [rax]
xor esi, esi
jmp 0x40cd28
mov rax, qword [0x0042f4a8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.0040cc60
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040cc60
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x40d390
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x0042f500]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0042f4e0]
test rbx, rbx
je 0x40d3ec
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 eax, eax
jne 0x40d3e3
test rsi, rsi
je 0x40d3e3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40d3c8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40d720
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x0041e910]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x40d740
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x40d748
ret
cmp word [r8 + 0x18], 0x20b
jne 0x40d740
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x40d79d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40d794
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d740
add rax, 0x28
cmp rax, r9
jne 0x40d780
xor eax, eax
ret

Function at 0x40d7a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0041e910]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x40d7bf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x40d7c8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x40d7bf
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x40d860
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0041e910]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x40d87f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x40d888
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x4dc6a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x005b3a04]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4dc828
mov rax, qword [0x005b3a08]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4dc6ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4dc775
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4dc6d0
mov rcx, rbx
call fcn.004dd340
test rax, rax
mov r12, rax
je 0x4dc85d
mov rax, qword [0x005b3a08]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.004dd470
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x005b3a08]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4dc840
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4dc76e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4dc7d0
add dword [0x005b3a04], 1
cmp edi, 8
jae 0x4dc7a3
test dil, 4
jne 0x4dc814
test edi, edi
je 0x4dc798
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4dc82f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x4dc798
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x4dc7bc
jmp 0x4dc798
add rsi, qword [0x005b3a08]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4dc76e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0053a050
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4dc798
xor esi, esi
jmp 0x4dc6f7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4dc798
mov rax, qword [0x005b3a08]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.0053a050
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0053a050
nop
nop dword [rax]

Function at 0x4dcfb0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x005b3ce0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x005b3cc0]
test rbx, rbx
je 0x4dd004
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x4dcffb
test rsi, rsi
je 0x4dcffb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4dcfe0
lea rcx, [0x005b3ce0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4dd340
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x005577f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4dd3ad
mov rcx, r8
call fcn.004dd220
test eax, eax
je 0x4dd3ad
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4dd3ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4dd3a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4dd3af
add rax, 0x28
cmp rax, r9
jne 0x4dd390
xor eax, eax
add rsp, 0x28
ret
Function at 0x53a050
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp fcn.00401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.004e2810
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.004e2810
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530