joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140013750
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x40
mov rbx, rcx
call fcn.140012580
xor edi, edi
mov dword [rax], edi
mov rcx, qword [rbx + 0x78]
cmp rcx, 0xffffffffffffffff
je 0x140013776
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
lea rcx, [rbx + 0xac]
mov dword [rsp + 0x28], 0x8000080
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x78], rax
cmp rax, 0xffffffffffffffff
jne 0x1400137ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
mov dword [rbx + 0x18], eax
call fcn.140012580
mov dword [rax], 9
jmp 0x1400138b7
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbx + 0x860], eax
cmp eax, 0xffffffff
jne 0x1400137fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
mov dword [rbx + 0x18], eax
call fcn.140012580
mov dword [rax], 9
jmp 0x140013899
cmp dword [rbx + 0x864], eax
jae 0x14001382f
mov rcx, qword [rbx + 0x868]
mov dword [rbx + 0x864], eax
test rcx, rcx
je 0x140013821
call fcn.140015b24
mov eax, dword [rbx + 0x864]
mov ecx, eax
call fcn.140015b1c
mov qword [rbx + 0x868], rax
mov rdx, qword [rbx + 0x868]
test rdx, rdx
jne 0x14001385a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
mov dword [rbx + 0x18], eax
call fcn.140012580
mov dword [rax], 9
mov dword [rbx + 0x864], edi
jmp 0x140013899
mov rcx, qword [rbx + 0x78]
lea r9, [rsp + 0x50]
mov r8d, 0x146
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140013882
cmp dword [rsp + 0x50], 0x146
jae 0x140013899
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
mov dword [rbx + 0x18], eax
call fcn.140012580
mov dword [rax], 8
mov rcx, rbx
call fcn.140012580
cmp dword [rax], edi
je 0x1400138b7
mov rcx, qword [rbx + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x78], 0xffffffffffffffff
mov rcx, rbx
call fcn.140012580
cmp dword [rax], edi
je 0x1400138d2
cmp qword [rbx + 0x868], rdi
je 0x1400138d2
mov dword [rbx + 0x860], edi
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x1400138e0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov edi, dword [rcx + 0x860]
lea r9, [rsp + 0x40]
mov rdx, qword [rcx + 0x868]
mov rbx, rcx
mov rcx, qword [rcx + 0x78]
sub edi, 0x146
mov r8d, edi
mov qword [rsp + 0x20], 0
add rdx, 0x146
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001392c
cmp dword [rsp + 0x40], edi
jae 0x140013943
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
mov dword [rbx + 0x18], eax
call fcn.140012580
mov dword [rax], 8
mov rcx, qword [rbx + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x78], 0xffffffffffffffff
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x140059674
Capabilities:
Enumerate files on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
invalid
invalid
lodsb al, byte [rsi]
Function at 0x14005bc7c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14005bcac
xor eax, eax
jmp 0x14005bd6f
mov rbp, rbx
cmp word [rax], si
je 0x14005bcd1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14005bcb8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14005bcb4
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14005bb2c
movsxd r14, eax
test eax, eax
jne 0x14005bd0f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14005bca5
mov rcx, r14
call fcn.140051ae8
mov rdi, rax
test rax, rax
jne 0x14005bd28
xor ecx, ecx
call fcn.140051aac
jmp 0x14005bd04
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14005bb2c
test eax, eax
jne 0x14005bd59
mov rcx, rdi
call fcn.140051aac
jmp 0x14005bd63
xor ecx, ecx
call fcn.140051aac
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140068474
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140049134
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400684fe
cmp byte [rbp - 0x21], r15b
je 0x1400684f9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140068534
call fcn.140056700
test eax, eax
jne 0x140068520
cmp byte [rbp - 0x21], r15b
je 0x140068518
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140068534
cmp byte [rbp - 0x21], r15b
je 0x140068531
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140058a04
test eax, eax
jne 0x1400685d4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140049134
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140068573
cmp byte [rbp - 0x21], r15b
je 0x1400685a8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400685a8
call fcn.140056700
test eax, eax
jne 0x140068594
cmp byte [rbp - 0x21], r15b
je 0x14006858d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400685a8
cmp byte [rbp - 0x21], r15b
je 0x1400685a5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140058a04
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400685d4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400685d7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400685e5
mov rcx, rdi
call fcn.140051aac
cmp byte [rbp + 0x3f], r15b
je 0x1400685f4
mov rcx, qword [rbp + 0x27]
call fcn.140051aac
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1406b5af8
Capabilities:
Encode data using xor

Disassembly:
add qword [rsp + 0x18], 0xffffffffbf900a7d
push qword [rsp + 0x30]
popfq
lea rsp, [rsp + 0x48]
call fcn.140e6c7a2
mov bh, 0x78
cld
mov dword [rbx + 0x45775111], edi
cmp dword [rdi], 0x874576a4
shr dword [rsi], 0xd0
movsb byte [rdi], byte gs:[rsi]
invalid
Function at 0x180002930
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
call fcn.180002f70
mov rcx, qword [rsp + 0x50]
call fcn.1800034a0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x18009bafc], eax
mov r8d, 0x104
lea rdx, [0x18009bd10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
ja 0x180002974
xor eax, eax
jmp 0x180002a21
xor eax, eax
test eax, eax
jne 0x180002954
mov dx, 0x5c
lea rcx, [0x18009bd10]
call fcn.180003130
test rax, rax
je 0x1800029aa
mov dx, 0x5c
lea rcx, [0x18009bd10]
call fcn.180003130
add rax, 2
mov qword [rsp + 0x28], rax
jmp 0x1800029b6
lea rax, [0x18009bd10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov r8d, 0x104
mov rdx, qword [rsp + 0x30]
lea rcx, [0x18009bb00]
call fcn.180003010
lea rdx, [0x18009bf20]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
ja 0x1800029f1
xor eax, eax
jmp 0x180002a21
xor eax, eax
test eax, eax
jne 0x1800029d7
mov byte [0x18009baf8], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x20], eax
call fcn.18005d640
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov ecx, eax
call fcn.18005d66c
mov eax, 1
add rsp, 0x48
ret
Function at 0x180050280
Capabilities:
Accept command line arguments

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x268
mov rax, qword [0x180099e80]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edx, 1
mov rcx, qword [rsp + 0x270]
call fcn.18004f480
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x30], 0
mov eax, 2
imul rax, rax, 0
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0x20a
jae 0x1800502e1
jmp 0x1800502e6
call fcn.18005e294
xor eax, eax
mov rcx, qword [rsp + 0x28]
mov word [rsp + rcx + 0x40], ax
cmp dword [rsp + 0x278], 0
je 0x180050306
cmp dword [rsp + 0x278], 0xffffffff
jne 0x180050356
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [rsp + 0x270]
mov dword [rcx + 8], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov qword [rsp + 0x30], rax
mov r8d, 0x104
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
ja 0x18005034b
xor eax, eax
jmp 0x1800504c5
xor eax, eax
test eax, eax
jne 0x18005032d
jmp 0x1800503f1
mov rax, qword [rsp + 0x270]
mov ecx, dword [rsp + 0x278]
mov dword [rax + 8], ecx
mov r8d, dword [rsp + 0x278]
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x180050392
cmp qword [rsp + 0x20], 0xffffffffffffffff
jne 0x180050399
xor eax, eax
jmp 0x1800504c5
xor eax, eax
test eax, eax
jne 0x180050382
mov r9d, 0x104
lea r8, [rsp + 0x40]
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
jne 0x1800503cc
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1800504c5
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call fcn.1800074e0
test eax, eax
jne 0x1800503f1
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1800504c5
mov rax, qword [rsp + 0x270]
add rax, 0x18
mov r8d, 0x104
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.180007170
test eax, eax
jne 0x18005041b
xor eax, eax
jmp 0x1800504c5
xor eax, eax
test eax, eax
jne 0x1800503f1
mov rax, qword [rsp + 0x270]
mov rcx, qword [rax + 0x18]
call fcn.1800508a0
mov rcx, qword [rsp + 0x270]
mov qword [rcx + 0x10], rax
mov rcx, qword [rsp + 0x30]
call fcn.180007790
mov rcx, qword [rsp + 0x270]
add rcx, 0x20
mov r8d, 0xffffffff
mov rdx, rax
call fcn.180007170
mov rcx, qword [rsp + 0x20]
call fcn.180007960
mov rcx, qword [rsp + 0x270]
mov dword [rcx + 0xc], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp qword [rsp + 0x20], rax
je 0x180050499
lea rcx, [rsp + 0x30]
call fcn.18004eff0
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x270]
cmp dword [rax + 0xc], 0xffffffff
jne 0x1800504ab
xor eax, eax
jmp 0x1800504c5
xor eax, eax
test eax, eax
jne 0x180050499
mov rax, qword [rsp + 0x270]
mov dword [rax + 0x28], 0
mov eax, 1
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.18005cf60
add rsp, 0x268
ret
Function at 0x180050c80
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rax, qword [0x180099e80]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x30], 0
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x180050d5f
cmp dword [rsp + 0x34], 1
je 0x180050cd9
jmp 0x180050d86
xor ecx, ecx
call fcn.180002930
nop
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
lea r9, str.APPG
xor r8d, r8d
lea rdx, str.ncalrpc
xor ecx, ecx
call qword [sym.imp.RPCRT4.dll_RpcStringBindingComposeA]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
jne 0x180050d3e
lea rdx, [0x1800a1b10]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.RPCRT4.dll_RpcBindingFromStringBindingA]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
jne 0x180050d3e
call fcn.180050b60
mov dword [rsp + 0x38], eax
jmp 0x180050d40
cmp dword [rsp + 0x38], 0
jne 0x180050d5d
xor eax, eax
test eax, eax
je 0x180050d5d
call fcn.1800034b0
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_ExitProcess]
jmp 0x180050d86
lea rcx, [rsp + 0x40]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeA]
mov dword [rsp + 0x30], eax
lea rcx, [0x1800a1b10]
call qword [sym.imp.RPCRT4.dll_RpcBindingFree]
mov dword [rsp + 0x30], eax
jmp 0x180050d81
call fcn.180002a30
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.18005cf60
add rsp, 0x58
ret

Function at 0x180057b70
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
mov r14, r9
mov rbp, r8
mov rdi, rdx
mov rsi, rcx
test rcx, rcx
je 0x180057ca9
test rdx, rdx
je 0x180057ca9
test r8, r8
je 0x180057ca9
mov r9d, 2
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.180053280
cmp rax, 2
je 0x180057bd0
mov eax, 0x80004005
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
mov eax, 0x5a4d
cmp word [rsp + 0x50], ax
jne 0x180057bbd
lea r8, [rbp + 0x3c]
mov r9d, 4
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.180053280
cmp rax, 4
jne 0x180057bbd
mov qword [rsp + 0x58], rbx
mov ebx, dword [rsp + 0x20]
add rbx, rbp
test r14, r14
je 0x180057c0d
mov qword [r14], rbx
lea r8, [rbx + 4]
mov r9d, 2
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.180053280
cmp rax, 2
jne 0x180057c9b
movzx eax, word [rsp + 0x50]
cmp eax, 0x14c
je 0x180057c7f
cmp eax, 0x8664
jne 0x180057c9b
mov r9d, 0x108
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.180053280
cmp rax, 0x108
jne 0x180057c9b
mov eax, 0x40
cmp dword [rsi], 0x4550
mov ecx, 0x80004005
cmovne eax, ecx
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
mov r9d, 0xf8
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.180053280
cmp rax, 0xf8
je 0x180057ca2
mov eax, 0x80004005
jmp 0x180057c6c
mov eax, 0x20
jmp 0x180057c5e
mov eax, 0x80070057
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret

Function at 0x18005d634
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.18005d49c
Function at 0x141186c38
Capabilities:
Encode data using xor

Disassembly:
jmp 0x141186c42
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x141186c6b
pop rbp
sub rbp, 0x33
sub rbp, 0x1186c38
sub rsp, 0x20
jmp 0x141186c8a
mov rax, 0x1186c38
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0x5c59f888
xor byte [rax], dl
inc rax
dec rcx
jne 0x141186ca9
jmp 0x141186cc0
rol byte [rcx], 0x61
add eax, dword [rcx]
mov ah, 0x88
mov byte [rax - 0x7fb6f640], cl
mov dword [rax + 0x6189c088], ecx
ror byte [rdi + 0x48], 0x82
mov byte [rax + 0x4a4fc088], cl
movabs al, byte [0x89c06a7fc0888888]
add rcx, qword [r9]
test byte [rax - 0x763f7778], cl
invalid
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bd950]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bd960]
mov dword [rax], 1
mov rax, qword [0x004bd970]
mov dword [rax], 1
mov rax, qword [0x004bd940]
mov dword [rax], 1
mov rax, qword [0x004bd810]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bd930]
mov dword [0x004e400c], 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 [0x004bd8f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004bcc50]
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 0x40c340
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 0x40c3b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e4634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40c558
mov rax, qword [0x004e4638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c3fc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40c487
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c3e0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40c592
mov rax, qword [0x004e4638]
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 [0x004e4638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c5a1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40c480
sub eax, 4
and eax, 0xfffffffb
jne 0x40c510
add dword [0x004e4634], 1
cmp ebx, 8
jae 0x40c4b8
test bl, 4
jne 0x40c560
test ebx, ebx
je 0x40c4a9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40c580
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 0x40c4a9
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 0x40c4ea
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 [0x004e4638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c480
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 0x40c407
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40c4a9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40c4a9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e4638]
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 0x40cd80
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004e4920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004e4900]
test rbx, rbx
je 0x40cdd4
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 0x40cdcb
test r12, r12
je 0x40cdcb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40cdb0
lea rcx, [0x004e4920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40d000
Capabilities:
Parse pe header

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

Function at 0x40d020
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 0x40d065
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 0x40d05c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d067
add rax, 0x28
cmp rax, r9
jne 0x40d048
xor eax, eax
ret

Function at 0x40d110
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004bd810]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40d189
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d189
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 0x40d186
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 0x40d17d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40d189
add r8, 0x28
cmp r8, r9
jne 0x40d168
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40d270
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bd810]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d2df
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d2df
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 0x40d2dd
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 0x40d2d4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d2e8
add rax, 0x28
cmp rax, r9
jne 0x40d2c0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d300
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004bd810]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d378
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d378
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d378
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d378
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 0x40d36c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d380
add rdx, 0x28
cmp rdx, r10
jne 0x40d358
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d390
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d39e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d375
test r8d, r8d
jg 0x40d388
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret