joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140030a28
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
and qword [rbp - 0x10], 0
mov rdi, r8
and qword [rbp - 0x18], 0
mov rbx, r9
and dword [rbp + 0x38], 0
mov rsi, rdx
mov r14, rcx
mov dword [rbp - 0x20], 4
mov rcx, rdi
mov dword [rbp - 0x1c], ebx
mov r8, r9
xor edx, edx
call fcn.14003ea90
mov r9d, dword [rbp + 0x40]
lea rcx, [rbp - 0x10]
xor r8d, r8d
mov dword [rsp + 0x20], 0xf0000040
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x140030b2b
mov edx, dword [rbp + 0x48]
lea rax, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140030b0b
mov rcx, qword [rbp - 0x18]
xor r9d, r9d
mov r8d, esi
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140030b0b
mov rcx, qword [rbp - 0x18]
lea r9, [rbp - 0x20]
and dword [rsp + 0x20], 0
lea r8, [rbp + 0x38]
mov edx, 4
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140030b0b
mov eax, dword [rbp + 0x38]
cmp rbx, rax
jb 0x140030b0b
and dword [rsp + 0x20], 0
lea r9, [rbp - 0x1c]
mov rcx, qword [rbp - 0x18]
mov r8, rdi
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140030b1a
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140030b2b
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret

Function at 0x140032440
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, 0x20
xor ebp, ebp
mov r14, rcx
xor ecx, ecx
lea edi, [rbp + 1]
jmp 0x140032492
mov r8d, edi
mov rdx, rbx
mov rcx, r14
mov rbp, rbx
mov esi, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
test eax, eax
je 0x1400324ce
cmp edi, esi
je 0x1400324ce
cmp edi, 0x8000
ja 0x1400324ce
cmp edi, esi
jb 0x1400324c9
mov rcx, rbx
mov rdx, rdi
call qword [fcn.140044924]
mov rbx, rax
test rax, rax
jne 0x140032465
mov rcx, rbp
call qword [fcn.140044914]
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
mov rax, rbx
jmp 0x1400324ae
mov rcx, rbx
jmp 0x1400324a6
jmp 0x140032440
Function at 0x1400324d4
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, 0x20
xor ebp, ebp
mov r14, rcx
xor ecx, ecx
lea edi, [rbp + 1]
jmp 0x140032492
mov r8d, edi
mov rdx, rbx
mov rcx, r14
mov rbp, rbx
mov esi, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
test eax, eax
je 0x1400324ce
cmp edi, esi
je 0x1400324ce
cmp edi, 0x8000
ja 0x1400324ce
cmp edi, esi
jb 0x1400324c9
mov rcx, rbx
mov rdx, rdi
call qword [fcn.140044924]
mov rbx, rax
test rax, rax
jne 0x140032465
mov rcx, rbp
call qword [fcn.140044914]
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
mov rax, rbx
jmp 0x1400324ae
mov rcx, rbx
jmp 0x1400324a6
jmp 0x140032440

Function at 0x140035f6c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub rsp, 0x28
mov rax, r8
mov r10, rdx
cmp ecx, 2
je 0x140035f8d
call fcn.140041584
mov dword [rax], 0x273f
xor eax, eax
add rsp, 0x28
ret
mov r8, r9
mov rdx, rax
mov rcx, r10
add rsp, 0x28
jmp 0x140035fa0
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x14009a0f8]
xor rax, rsp
mov qword [rsp + 0x50], rax
movzx eax, byte [rcx + 3]
mov rbx, rdx
movzx edx, byte [rcx + 2]
mov rdi, r8
movzx r10d, byte [rcx + 1]
lea r8, str._d._d._d._d
movzx r9d, byte [rcx]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], edx
mov edx, reloc.WS2_32.dll_recv
mov byte [rsp + 0x40], 0
mov dword [rsp + 0x20], r10d
call fcn.14002d9a8
lea rcx, [rsp + 0x40]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140036001
test rax, rax
je 0x140036036
cmp rax, rdi
jae 0x140036036
lea rax, [rsp + 0x40]
mov r8, rbx
sub r8, rax
lea rdx, [rsp + 0x40]
mov cl, byte [rdx]
mov byte [r8 + rdx], cl
inc rdx
test cl, cl
jne 0x140036024
mov rax, rbx
jmp 0x140036043
call fcn.140041584
mov dword [rax], 0x1c
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14003d6b0
mov rbx, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
Function at 0x140039058
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x170
mov rax, qword [0x14009a0f8]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov qword [rsp + 0x50], rcx
mov r15, r8
mov rcx, rdx
mov r12, rdx
xor esi, esi
xor edi, edi
call fcn.1400550a8
mov rbp, rax
test rax, rax
jne 0x1400390d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140035048
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r8, r12
mov r9, rax
mov rcx, r15
call fcn.140022e68
mov ebx, 0x4d
jmp 0x14003921e
and qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rbp
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14003912b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140035048
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
jmp 0x1400390bf
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140039174
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140035048
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r8, r12
mov r9, rax
mov rcx, r15
call fcn.140022e68
mov ebx, 0x4d
jmp 0x140039215
mov rbx, qword [rsp + 0x48]
mov eax, 0x100000
cmp rbx, rax
jle 0x140039197
mov r8d, eax
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, r15
call fcn.140022e68
jmp 0x14003916a
lea rcx, [rbx + 1]
call qword [fcn.14004491c]
mov rsi, rax
test rax, rax
jne 0x1400391ae
lea ebx, [rax + 0x1b]
jmp 0x140039215
test rbx, rbx
je 0x1400391f7
and dword [rsp + 0x40], 0
lea rdx, [rsi + rdi]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, ebx
mov r13d, edi
sub r8d, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140039261
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x1400391ee
mov ebx, r13d
jmp 0x1400391f0
add edi, eax
mov eax, edi
cmp rax, rbx
jb 0x1400391b3
mov rcx, qword [rsp + 0x50]
mov r9, r12
mov r8, rbx
mov byte [rbx + rsi], 0
mov rdx, rsi
mov qword [rsp + 0x20], r15
call fcn.140038e78
mov ebx, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [fcn.140044914]
test rbp, rbp
je 0x140039234
mov rcx, rbp
call fcn.140044914
mov eax, ebx
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.14003d6b0
mov rbx, qword [rsp + 0x1c8]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140035048
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
jmp 0x14003915c
Function at 0x14003b0c8
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ecx, dword [rcx + 0x20]
mov r14, rdx
add rcx, 0x18
mov ebp, r8d
lea r9d, [rax + rax]
add rcx, r9
call qword [fcn.14004491c]
xor esi, esi
mov rdi, rax
test rax, rax
je 0x14003b1d1
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x14003b14a
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + ioctlsocket]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
test rbp, rbp
je 0x14003b1c6
mov rsi, rbp
mov al, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + ioctlsocket]
mov al, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
mov r8d, 1
mov byte [rsp + 0x40], al
inc r14
mov rcx, qword [rdi + 0x10]
call qword [rbx + ioctlsocket]
sub rbp, 1
jne 0x14003b15a
jmp 0x14003b1c6
mov rcx, qword [rdi + 8]
lea rdx, [0x14007f799]
mov r8d, 1
call qword [rbx + ioctlsocket]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14007f79a]
mov r8d, 1
call qword [rbx + ioctlsocket]
inc rsi
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jb 0x14003b19b
mov rax, rdi
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret

Function at 0x140052d50
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140052ab4
Function at 0x140059d20
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax + 8], rcx
push rbp
mov rbp, rsp
sub rsp, 0x20
test rcx, rcx
jne 0x140059bc0
call fcn.140041584
mov dword [rax], socket
call fcn.140041434
or eax, 0xffffffff
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop rbp
ret
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140059ba8
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
shr ecx, 0xc
test cl, 1
jne 0x140059ba8
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
mov rax, qword [rbp + 0x10]
shr ecx, 1
test cl, 1
je 0x140059bf2
lock or dword [rax + 0x14], 0x10
jmp 0x140059ba8
lock or dword [rax + 0x14], 1
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
test ecx, 0x4c0
jne 0x140059c0f
mov rcx, qword [rbp + 0x10]
call fcn.140061bb4
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 8]
mov qword [rax], rcx
mov rbx, qword [rbp + 0x10]
mov rcx, rbx
call fcn.140057ae4
mov rdx, qword [rbp + 0x10]
mov ecx, eax
mov r8d, dword [rdx + 0x20]
mov rdx, qword [rdx + 8]
call fcn.140055650
mov dword [rbx + 0x10], eax
mov rax, qword [rbp + 0x10]
mov edx, dword [rax + 0x10]
lea ecx, [rdx + 1]
cmp ecx, 1
ja 0x140059c66
neg edx
sbb ecx, ecx
and ecx, 8
add ecx, 8
lock or dword [rax + 0x14], ecx
mov rax, qword [rbp + 0x10]
and dword [rax + 0x10], 0
jmp 0x140059ba8
mov ecx, dword [rax + 0x14]
test cl, 6
jne 0x140059cd2
mov rcx, qword [rbp + 0x10]
call fcn.140057ae4
cmp eax, 0xffffffff
je 0x140059cb9
mov rcx, qword [rbp + 0x10]
call fcn.140057ae4
cmp eax, 0xfffffffe
je 0x140059cb9
mov rbx, qword [rbp + 0x10]
mov rcx, rbx
call fcn.140057ae4
movsxd rdi, eax
lea rsi, [0x14009c2b0]
mov rcx, rbx
sar rdi, 6
call fcn.140057ae4
and eax, 0x3f
shl rax, 6
add rax, qword [rsi + rdi*8]
jmp 0x140059cc0
lea rax, [0x14009a5a0]
mov al, byte [rax + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140059cd2
mov rax, qword [rbp + 0x10]
lock or dword [rax + 0x14], 0x20
mov rax, qword [rbp + 0x10]
cmp dword [rax + 0x20], 0x200
jne 0x140059d08
mov ecx, dword [rax + 0x14]
shr ecx, 6
test cl, 1
je 0x140059d04
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
shr ecx, 8
test cl, 1
jne 0x140059d04
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x20], 0x1000
mov rax, qword [rbp + 0x10]
dec dword [rax + 0x10]
mov rcx, qword [rax]
movzx edx, byte [rcx]
inc rcx
mov qword [rax], rcx
mov eax, edx
jmp 0x140059bab
jmp 0x140059b78
Function at 0x4015c0
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, rdx
mov r8d, edx
lea r9, [rsp + 0x3c]
mov rdx, rcx
mov qword [rsp + 0x20], 0
mov rcx, qword [0x0041f080]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401620
mov eax, dword [rsp + 0x3c]
cmp rax, rbx
je 0x401611
mov r8d, 0xe5
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.read_size__size
call qword [sym.imp.msvcrt.dll__assert]
nop
add rsp, 0x40
pop rbx
ret
mov r8d, 0xe4
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.bool_res
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x4015ed

Function at 0x401670
Capabilities:
Delete file

Disassembly:
push rbx
sub rsp, 0x90
movaps xmmword [rsp + 0x80], xmm6
lea rbx, [0x0040c06a]
lea rax, [0x0041d080]
mov rcx, qword [0x00410040]
movq xmm6, rax
movq xmm0, rbx
punpcklqdq xmm6, xmm0
test rcx, rcx
je 0x4016df
call qword [sym.imp.KERNEL32.dll_GetProcessId]
xor ecx, ecx
mov edx, eax
call qword [sym.imp.KERNEL32.dll_GenerateConsoleCtrlEvent]
test eax, eax
je 0x401748
mov rcx, qword [0x00410040]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x00410040]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x0041d060], 0
jne 0x401700
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x90
pop rbx
ret
mov eax, 0x414
mov dword [rsp + 0x48], 3
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], 0
mov word [rsp + 0x60], ax
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], rbx
movaps xmmword [rsp + 0x50], xmm6
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
jmp 0x4016e8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, 0x400
xor edx, edx
mov qword [rsp + 0x30], 0
mov r8d, eax
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0
mov ecx, 0x1300
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea rcx, str.Failed_to_send_CTRL_C_to_child_process.
call sub.msvcrt.dll_puts
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_puts
jmp 0x4016c0
Function at 0x401ad0
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc30
xor r9d, r9d
mov word [rcx], r9w
movzx eax, word [rdx]
mov rbx, rcx
mov rsi, r8
test ax, ax
je 0x401be0
lea rdi, [rdx + 2]
lea rbp, str.TEMP
xor edx, edx
lea r12, str.PROGRAM
lea r13, [0x0040c12c]
jmp 0x401b40
test rdx, rdx
je 0x401bc0
mov word [rdx], ax
add rdx, 2
movzx eax, word [rdi]
add rdi, 2
test ax, ax
je 0x401be0
cmp ax, 0x25
jne 0x401b20
test rdx, rdx
je 0x401bf0
xor ecx, ecx
lea r14, [rsp + 0x430]
mov word [rdx], cx
mov rdx, rbp
mov rcx, r14
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x401ca8
mov rdx, r12
mov rcx, r14
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x401cb8
mov rdx, r13
mov rcx, r14
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x401c70
lea rdx, str.TIME
mov rcx, r14
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x401c10
xor eax, eax
add rsp, 0xc30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
test rsi, rsi
je 0x401ba8
mov word [rbx], ax
movzx eax, word [rdi]
sub rsi, 1
add rbx, 2
add rdi, 2
test ax, ax
jne 0x401b40
xor eax, eax
mov word [rbx], ax
mov eax, 1
jmp 0x401baa
xor r8d, r8d
lea rdx, [rsp + 0x430]
mov word [rsp + 0x430], r8w
jmp 0x401b30
lea rcx, [rsp + 0x28]
lea r14, [rsp + 0x30]
mov qword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov r9, qword [rsp + 0x28]
mov rcx, r14
lea r8, str._lld
mov edx, 0x400
call fcn.00401540
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call fcn.004019d0
jmp 0x401c60
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x401c58
xor edx, edx
jmp 0x401b30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea r14, [rsp + 0x30]
mov edx, pe_nt_image_headers64
lea r8, [0x0040c134]
mov rcx, r14
mov r9d, eax
call fcn.00401540
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call fcn.004019d0
jmp 0x401c60
mov rdx, rbx
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x401c60
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp word [rbx], 0
mov rdx, rsi
mov rcx, qword [rax]
mov rax, rbx
je 0x401cee
nop dword [rax + rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x401ce0
movzx r8d, word [rcx]
test r8w, r8w
je 0x401d23
test rdx, rdx
jne 0x401d09
jmp 0x401d2d
test rdx, rdx
je 0x409d3a
add rcx, 2
mov word [rax], r8w
add rax, 2
sub rdx, 1
movzx r8d, word [rcx]
test r8w, r8w
jne 0x401d00
xor edx, edx
mov word [rax], dx
jmp 0x401c60
jmp 0x409d3a

Function at 0x402110
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 fcn.00409a80
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.00409a80
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x402180
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x0041f124]
mov r12, rcx
test ebx, ebx
jle 0x4022b0
mov rax, qword [0x0041f128]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x4021cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x402255
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x4021b0
mov rcx, r12
call fcn.00402be0
mov rsi, rax
test rax, rax
je 0x4022d2
mov rax, qword [0x0041f128]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.00402d00
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x0041f128]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4022b7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40224e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x402260
add dword [0x0041f124], 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 [0x0041f128]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40224e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00402110
nop dword [rax]
xor ebx, ebx
jmp 0x4021d8
mov rax, qword [0x0041f128]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.00402110
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00402110
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x4028d0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x4029a0
ja 0x402920
test edx, edx
je 0x4029b0
mov eax, dword [0x0041f168]
test eax, eax
je 0x402a78
mov dword [0x0041f168], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
ret
cmp edx, 3
jne 0x402906
mov eax, dword [0x0041f168]
test eax, eax
je 0x402906
lea r13, [0x0041f180]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0041f160]
test rbx, rbx
je 0x40298c
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 0x402aa0
test r12, r12
je 0x402aa0
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402960
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x402906
call fcn.00402100
jmp 0x402906
mov eax, dword [0x0041f168]
test eax, eax
jne 0x402a10
mov eax, dword [0x0041f168]
cmp eax, 1
jne 0x402906
mov rbx, qword [0x0041f160]
test rbx, rbx
je 0x4029e9
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call sub.msvcrt.dll_free
test rbx, rbx
jne 0x4029d8
lea rcx, [0x0041f180]
mov qword [0x0041f160], 0
mov dword [0x0041f168], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x402906
lea r13, [0x0041f180]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0041f160]
test rbx, rbx
je 0x402a64
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x402a90
test r12, r12
je 0x402a90
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402a40
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4029ba
lea rcx, [0x0041f180]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x4028fc
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402a40
jmp 0x402a64
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402960
jmp 0x40298c

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

Disassembly:
mov r8, qword [0x0040c980]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x402c00
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x402c08
ret
cmp word [rdx + 0x18], 0x20b
jne 0x402c00
movzx eax, word [rdx + 0x14]
sub rcx, r8
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x402c4d
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 0x402c44
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402c00
add rax, 0x28
cmp rax, r9
jne 0x402c30
xor eax, eax
ret

Function at 0x402c50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0040c980]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x402c70
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x402c78
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x402c70
movzx r8d, word [rax + 6]
mov eax, r8d
ret
Function at 0x402d00
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0040c980]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x402d20
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x402d28
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret