joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001122b
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
jmp 0x1400124b0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x438
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0xa6
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x458]
mov rax, qword [0x14002e040]
xor rax, rbp
mov qword [rbp + 0x408], rax
lea rcx, [0x14003416c]
call fcn.14001166d
nop
lea rdx, [rbp + 0x70]
mov cx, 0x202
call fcn.1400113bb
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0
je 0x140012537
mov edx, dword [rbp + 0x224]
lea rcx, str.WSAStartup_function_failed_with_error:__d_n
call fcn.140011032
nop
mov eax, 1
jmp 0x14001268e
mov r8d, 6
mov edx, 1
mov ecx, 2
call fcn.1400111c7
mov qword [rbp + 0x248], rax
cmp qword [rbp + 0x248], 0xffffffffffffffff
jne 0x140012581
call fcn.140011636
mov edx, eax
lea rcx, str.socket_function_failed_with_error:__ld_n
call fcn.140011032
nop
call fcn.1400112e4
nop
mov eax, 1
jmp 0x14001268e
mov r8d, recv
xor edx, edx
lea rcx, [rbp + 0x38]
call fcn.1400114ec
nop
mov r8d, socket
xor edx, edx
lea rcx, [rbp + 8]
call fcn.1400114ec
nop
mov r8d, socket
mov rdx, qword [rbp + 0x430]
lea rcx, [rbp + 8]
call qword [sym.imp.ucrtbased.dll_wcstombs]
nop
mov eax, 2
mov word [rbp + 0x268], ax
lea rcx, [rbp + 8]
call fcn.140011299
mov dword [rbp + 0x26c], eax
movzx ecx, word [rbp + 0x438]
call fcn.1400115eb
mov word [rbp + 0x26a], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x268]
mov rcx, qword [rbp + 0x248]
call fcn.140011348
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0xffffffff
jne 0x140012663
call fcn.140011636
mov edx, eax
lea rcx, str.____ConnectSocket:_connect_function_failed_with_error:__ld_n
call fcn.140011032
nop
mov rcx, qword [rbp + 0x248]
call fcn.140011451
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0xffffffff
jne 0x140012656
call fcn.140011636
mov edx, eax
lea rcx, str.closesocket_function_failed_with_error:__ld_n
call fcn.140011032
nop
call fcn.1400112e4
nop
mov eax, 1
jmp 0x14001268e
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov r8d, dword [rbp + 0x438]
lea rdx, [rbp + 8]
lea rcx, str.___Connected_to_the_HTTP_server_with_ip__s_and_port__d_n
call fcn.1400112e9
nop
mov rax, qword [rbp + 0x248]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, reloc.WS2_32.dll_connect
call fcn.140011582
mov rax, rdi
mov rcx, qword [rbp + 0x408]
xor rcx, rbp
call fcn.140011307
lea rsp, [rbp + 0x418]
pop rdi
pop rbp
ret
Function at 0x140011348
Capabilities:
Connect socket

Disassembly:
jmp 0x14001f9b6
jmp qword [sym.imp.WS2_32.dll_connect]

Function at 0x140011361
Capabilities:
Decode data using base64 via winapi
Terminate process

Disassembly:
jmp 0x140014070
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x128
lea rbp, [rsp + 0x40]
lea rcx, [0x14003416c]
call fcn.14001166d
nop
mov rax, qword [rbp + 0x110]
mov dword [rax], 0x3f40
mov rax, qword [rbp + 0x110]
movsxd rax, dword [rax]
mov qword [rbp + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rbp + 0xd8]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 8], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov rax, qword [rbp + 0x110]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp + 8]
mov r8d, 1
mov edx, dword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x140014157
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CryptStringToBinaryA_failed_with_error_code__d
call fcn.1400112e9
nop
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp + 8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov qword [rbp + 8], 0
mov ecx, 0xffffffff
call qword [sym.imp.ucrtbased.dll_exit]
nop
mov rax, qword [rbp + 8]
lea rsp, [rbp + 0xe8]
pop rdi
pop rbp
ret

Function at 0x140011398
Capabilities:
Terminate process

Disassembly:
jmp 0x14001b750
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]
nop
add rsp, 0x28
ret
Function at 0x1400113d4
Capabilities:
Decode data using base64 via winapi
Terminate process

Disassembly:
jmp 0x140017130
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x40]
lea rcx, [0x140034482]
call fcn.14001166d
nop
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov rax, qword [rbp + 0xf8]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp + 0xf0]
mov r8d, 1
mov edx, dword [rbp + 0xe8]
mov rcx, qword [rbp + 0xe0]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryW]
test eax, eax
jne 0x1400171c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CryptStringToBinaryW_failed_with_error_code__d_n
call fcn.1400112e9
nop
mov ecx, 0xffffffff
call qword [sym.imp.ucrtbased.dll_exit]
nop
lea rsp, [rbp + 0xc8]
pop rdi
pop rbp
ret
Function at 0x1400113f2
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
jmp 0x140017200
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x438
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0xa6
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x458]
mov rax, qword [0x14002e040]
xor rax, rbp
mov qword [rbp + 0x408], rax
lea rcx, [0x140034548]
call fcn.14001166d
nop
lea rdx, [rbp + 0x70]
mov cx, 0x202
call fcn.1400113bb
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0
je 0x140017287
mov edx, dword [rbp + 0x224]
lea rcx, str.WSAStartup_function_failed_with_error:__d_n
call fcn.140011032
nop
mov eax, 1
jmp 0x1400173de
mov r8d, 6
mov edx, 1
mov ecx, 2
call fcn.1400111c7
mov qword [rbp + 0x248], rax
cmp qword [rbp + 0x248], 0xffffffffffffffff
jne 0x1400172d1
call fcn.140011636
mov edx, eax
lea rcx, str.socket_function_failed_with_error:__ld_n
call fcn.140011032
nop
call fcn.1400112e4
nop
mov eax, 1
jmp 0x1400173de
mov r8d, recv
xor edx, edx
lea rcx, [rbp + 0x38]
call fcn.1400114ec
nop
mov r8d, socket
xor edx, edx
lea rcx, [rbp + 8]
call fcn.1400114ec
nop
mov r8d, socket
mov rdx, qword [rbp + 0x430]
lea rcx, [rbp + 8]
call qword [sym.imp.ucrtbased.dll_wcstombs]
nop
mov eax, 2
mov word [rbp + 0x268], ax
lea rcx, [rbp + 8]
call fcn.140011299
mov dword [rbp + 0x26c], eax
movzx ecx, word [rbp + 0x438]
call fcn.1400115eb
mov word [rbp + 0x26a], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x268]
mov rcx, qword [rbp + 0x248]
call fcn.140011348
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0xffffffff
jne 0x1400173b3
call fcn.140011636
mov edx, eax
lea rcx, str.____ConnectSocket:_connect_function_failed_with_error:__ld_n
call fcn.140011032
nop
mov rcx, qword [rbp + 0x248]
call fcn.140011451
mov dword [rbp + 0x224], eax
cmp dword [rbp + 0x224], 0xffffffff
jne 0x1400173a6
call fcn.140011636
mov edx, eax
lea rcx, str.closesocket_function_failed_with_error:__ld_n
call fcn.140011032
nop
call fcn.1400112e4
nop
mov eax, 1
jmp 0x1400173de
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov r8d, dword [rbp + 0x438]
lea rdx, [rbp + 8]
lea rcx, str.___Connected_to_the_SMB_server_with_ip__s_and_port__d_n
call fcn.1400112e9
nop
mov rax, qword [rbp + 0x248]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, reloc.WS2_32.dll_connect
call fcn.140011582
mov rax, rdi
mov rcx, qword [rbp + 0x408]
xor rcx, rbp
call fcn.140011307
lea rsp, [rbp + 0x418]
pop rdi
pop rbp
ret
Function at 0x140011474
Capabilities:
Parse pe header

Disassembly:
jmp 0x14001e080
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14001e0a0
xor al, al
jmp 0x14001e121
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14001e0b3
xor al, al
jmp 0x14001e121
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 0x14001e0dd
xor al, al
jmp 0x14001e121
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x14001e0f1
xor al, al
jmp 0x14001e121
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x14001e103
xor al, al
jmp 0x14001e121
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001e11f
xor al, al
jmp 0x14001e121
mov al, 1
add rsp, 0x38
ret
Function at 0x14001bfe0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.1400116b3
movzx eax, al
test eax, eax
jne 0x14001c000
mov ecx, 7
call fcn.14001158c
nop
mov byte [rsp + 0x20], 0
call fcn.1400115b4
mov byte [rsp + 0x21], al
cmp dword [0x14002ecf0], 1
jne 0x14001c024
mov ecx, 7
call fcn.14001158c
nop
jmp 0x14001c07c
cmp dword [0x14002ecf0], 0
jne 0x14001c077
mov dword [0x14002ecf0], 1
lea rdx, [0x140024660]
lea rcx, [0x140024330]
call fcn.1400112ee
test eax, eax
je 0x14001c058
mov eax, 0xff
jmp 0x14001c181
lea rdx, [0x140024220]
lea rcx, [section..rdata]
call fcn.1400115a5
mov dword [0x14002ecf0], 2
jmp 0x14001c07c
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.140011573
call fcn.1400114b0
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x14001c0d9
mov rcx, qword [rsp + 0x30]
call fcn.140011267
movzx eax, al
test eax, eax
je 0x14001c0d9
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x140035020]
nop
call fcn.140011500
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x14001c10d
mov rcx, qword [rsp + 0x38]
call fcn.140011267
movzx eax, al
test eax, eax
je 0x14001c10d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.14001163b
nop
call fcn.14001c230
mov dword [rsp + 0x28], eax
call fcn.140011474
movzx eax, al
test eax, eax
jne 0x14001c12c
mov ecx, dword [rsp + 0x28]
call fcn.14001106e
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x14001c13b
call fcn.14001164f
nop
xor edx, edx
mov cl, 1
call fcn.140011249
mov eax, dword [rsp + 0x28]
jmp 0x14001c181
add rsp, 0x68
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bf1a0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bf1b0]
mov dword [rax], 1
mov rax, qword [0x004bf1c0]
mov dword [rax], 1
mov rax, qword [0x004bf190]
mov dword [rax], 1
mov rax, qword [0x004bf060]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bf180]
mov dword [0x004e500c], 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 [0x004bf140]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004be4b0]
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 0x40172f
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
lea rcx, [0x004b8001]
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401773
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_load_cryptdll.dll._Error_code:__lu_n
call sym.wprintf
mov eax, 1
jmp 0x401912
mov rax, qword [rbp - 8]
lea rdx, str.CDLocateCSystem
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5080], rax
mov rax, qword [0x004e5080]
test rax, rax
jne 0x4017ce
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_get_the_address_of_CDLocateCSystem._Error_code:__lu_n
call sym.wprintf
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FreeLibrary]
call rax
mov eax, 1
jmp 0x401912
lea rcx, [0x004b80fe]
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x4017ff
lea rcx, str.Failed_to_load_ntdll.dll_n
call sym.printf_char_const__::_
mov eax, 1
jmp 0x401912
mov rax, qword [rbp - 0x10]
lea rdx, str.NtQuerySystemInformation
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5060], rax
mov rax, qword [rbp - 0x10]
lea rdx, str.RtlInitUnicodeString
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5068], rax
mov rax, qword [rbp - 0x10]
lea rdx, str.NtQueryInformationProcess
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5070], rax
mov rax, qword [rbp - 0x10]
lea rdx, str.RtlGetCurrentPeb
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5078], rax
mov rax, qword [rbp - 0x10]
lea rdx, str.RtlEqualUnicodeString
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x004e5050], rax
mov rax, qword [0x004e5060]
test rax, rax
jne 0x4018ad
lea rcx, str.Failed_to_resolve_NtQuerySystemInformation_n
call sym.printf_char_const__::_
mov rax, qword [0x004e5068]
test rax, rax
jne 0x4018c5
lea rcx, str.Failed_to_resolve_RtlInitUnicodeString_n
call sym.printf_char_const__::_
mov rax, qword [0x004e5070]
test rax, rax
jne 0x4018dd
lea rcx, str.Failed_to_resolve_NtQueryInformationProcess_n
call sym.printf_char_const__::_
mov rax, qword [0x004e5078]
test rax, rax
jne 0x4018f5
lea rcx, str.Failed_to_resolve_RtlGetCurrentPeb_n
call sym.printf_char_const__::_
mov rax, qword [0x004e5050]
test rax, rax
jne 0x40190d
lea rcx, str.Failed_to_resolve_RtlEqualUnicodeString_n
call sym.printf_char_const__::_
mov eax, 0
add rsp, 0x30
pop rbp
ret
Function at 0x4021ee
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rcx, str.kull_m_process_ntheaders_n
call sym.wprintf
mov dword [rbp - 4], 0
mov qword [rbp - 0x60], 0
mov qword [rbp - 0x58], 0
lea rax, [0x004e5040]
mov qword [rbp - 0x58], rax
lea rax, [rbp - 0x50]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x70], 0
lea rax, [0x004e5040]
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x80], 0
mov qword [rbp - 0x78], 0
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 8]
mov qword [rbp - 0x78], rax
lea rax, [rbp - 0x60]
mov r8d, 0x40
mov rdx, qword [rbp + 0x10]
mov rcx, rax
call sym.kull_m_memory_copy__KULL_M_MEMORY_ADDRESS___KULL_M_MEMORY_ADDRESS__unsigned_long_long_
test eax, eax
je 0x402291
movzx eax, word [rbp - 0x50]
cmp ax, 0x5a4d
jne 0x402291
mov eax, 1
jmp 0x402296
mov eax, 0
test al, al
je 0x40238e
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax]
mov eax, dword [rbp - 0x14]
cdqe
add rax, rdx
mov qword [rbp - 0x80], rax
mov edx, 0x18
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_LocalAlloc]
call rax
mov qword [rbp - 0x60], rax
mov rax, qword [rbp - 0x60]
test rax, rax
setne al
test al, al
je 0x40238e
lea rdx, [rbp - 0x80]
lea rax, [rbp - 0x60]
mov r8d, 0x18
mov rcx, rax
call sym.kull_m_memory_copy__KULL_M_MEMORY_ADDRESS___KULL_M_MEMORY_ADDRESS__unsigned_long_long_
test eax, eax
je 0x4022ff
mov rax, qword [rbp - 0x60]
mov eax, dword [rax]
cmp eax, 0x4550
mov rax, qword [rbp - 0x60]
movzx eax, word [rax + 4]
cmp ax, 0x14c
jne 0x402314
mov eax, 0xf8
jmp 0x402319
mov eax, 0x108
mov dword [rbp - 8], eax
mov eax, dword [rbp - 8]
mov rdx, rax
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_LocalAlloc]
call rax
mov qword [rbp - 0x70], rax
mov rax, qword [rbp - 0x70]
test rax, rax
setne al
test al, al
je 0x40237e
mov ecx, dword [rbp - 8]
lea rdx, [rbp - 0x80]
lea rax, [rbp - 0x70]
mov r8, rcx
mov rcx, rax
call sym.kull_m_memory_copy__KULL_M_MEMORY_ADDRESS___KULL_M_MEMORY_ADDRESS__unsigned_long_long_
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
je 0x40236e
mov rdx, qword [rbp - 0x70]
mov rax, qword [rbp + 0x18]
mov qword [rax], rdx
jmp 0x40237e
mov rax, qword [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov rax, qword [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LocalFree]
call rax
mov eax, dword [rbp - 4]
add rsp, 0xa0
pop rbp
ret
Function at 0x403b6b
Capabilities:
Acquire debug privileges

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
lea rdx, [rbp - 8]
mov r8, rdx
mov edx, 0x28
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call rax
test eax, eax
sete al
test al, al
je 0x403bbb
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.OpenProcessToken_error:__s_n
call sym.wprintf
mov eax, 0
jmp 0x403c09
mov rax, qword [rbp - 8]
mov r8d, 1
lea rdx, str.SeDebugPrivilege
mov rcx, rax
call sym.SetPrivilege_void__char_const__int_
test eax, eax
sete al
test al, al
je 0x403bf4
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x403c09
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
add rsp, 0x30
pop rbp
ret

Function at 0x40efc0
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 0x40f030
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e5674]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40f1d8
mov rax, qword [0x004e5678]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40f07c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40f107
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40f060
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40f212
mov rax, qword [0x004e5678]
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 [0x004e5678]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40f221
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40f100
sub eax, 4
and eax, 0xfffffffb
jne 0x40f190
add dword [0x004e5674], 1
cmp ebx, 8
jae 0x40f138
test bl, 4
jne 0x40f1e0
test ebx, ebx
je 0x40f129
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40f200
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 0x40f129
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 0x40f16a
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 [0x004e5678]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40f100
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 0x40f087
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40f129
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40f129
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e5678]
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 0x40fa00
Capabilities:
Get thread local storage value

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

Function at 0x40fc80
Capabilities:
Parse pe header

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

Function at 0x40fca0
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 0x40fce5
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 0x40fcdc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40fce7
add rax, 0x28
cmp rax, r9
jne 0x40fcc8
xor eax, eax
ret

Function at 0x40fd90
Capabilities:
Enumerate pe sections

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

Function at 0x40fef0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bf060]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40ff5f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40ff5f
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 0x40ff5d
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 0x40ff54
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40ff68
add rax, 0x28
cmp rax, r9
jne 0x40ff40
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret