joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402017
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push rbp
sub rsp, 0x270
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x200], ecx
mov qword [rbp + 0x208], rdx
mov dword [rbp + 0x210], r8d
mov eax, dword [rbp + 0x210]
movsxd rdx, eax
mov rax, qword [rbp + 0x208]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x48], 0x1e
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1ec], 0
jmp 0x40209b
mov eax, dword [rbp + 0x1ec]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x4020a6
add dword [rbp + 0x1ec], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jb 0x40207c
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jne 0x4020d6
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x4020d6
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1ec]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
lea ecx, [rax + 1]
lea r8, [rbp - 0x40]
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8d, 0
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
mov dword [rbp + 0x1d0], eax
cmp dword [rbp + 0x1d0], 0
jg 0x4021ee
jmp 0x4021de
mov dword [rbp - 0x48], 0x1e
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1e4], 0
jmp 0x40215d
mov eax, dword [rbp + 0x1e4]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x402168
add dword [rbp + 0x1e4], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1e4], eax
jb 0x40213e
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1e4], eax
jne 0x402198
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x402198
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1e4]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
lea ecx, [rax + 1]
lea r8, [rbp - 0x40]
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8d, 0
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
mov dword [rbp + 0x1d0], eax
cmp dword [rbp + 0x1d0], 0
jg 0x4021ed
add dword [rbp + 0x1e8], 1
nop
cmp dword [rbp + 0x1e8], 9
jle 0x40211d
jmp 0x4021ee
nop
mov dword [rbp + 0x1d4], 0
mov rax, qword [rbp + 0x208]
mov qword [rbp + 0x1d8], rax
jmp 0x402269
mov eax, dword [0x00418040]
cdqe
lea rdx, [rbp - 0x49]
mov r9d, 0
mov r8d, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
cmp eax, 1
je 0x402242
mov rax, qword [rbp + 0x1d8]
mov byte [rax], 0
mov eax, 0xffffffff
jmp 0x402290
mov rax, qword [rbp + 0x1d8]
lea rdx, [rax + 1]
mov qword [rbp + 0x1d8], rdx
movzx edx, byte [rbp - 0x49]
mov byte [rax], dl
movzx eax, byte [rbp - 0x49]
cmp al, 0xa
je 0x40227f
add dword [rbp + 0x1d4], 1
mov eax, dword [rbp + 0x210]
lea edx, [rax - 1]
mov dword [rbp + 0x210], edx
cmp eax, 1
jg 0x402208
jmp 0x402280
nop
mov rax, qword [rbp + 0x1d8]
mov byte [rax], 0
mov eax, dword [rbp + 0x1d4]
add rsp, 0x270
pop rbp
ret
Function at 0x402299
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov ecx, 0x800
call sym.malloc
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov r8d, 0x800
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp - 8]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x20], rax
mov rcx, qword [rbp - 0x20]
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp - 8]
mov r8, rcx
mov rcx, rax
call sym.vsprintf
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.strlen
mov rdx, qword [rbp - 0x10]
add rax, rdx
mov byte [rax], 0xa
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov eax, dword [rbp + 0x10]
cdqe
mov rdx, qword [rbp - 0x10]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.free
mov eax, dword [rbp - 0x14]
add rsp, 0x40
pop rbp
ret

Function at 0x4023a6
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
lea rax, str.C:Python27python.exe
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
je 0x4023cf
lea rax, [0x00413c7e]
jmp 0x402439
lea rax, str.C:Python38python.exe
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
je 0x4023f0
lea rax, [0x00413c7e]
jmp 0x402439
lea rax, str.C:Perl_binperl.exe
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
je 0x402411
lea rax, [0x00413c7e]
jmp 0x402439
lea rax, str.C:WindowsSystem32_telnetd.exe
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
je 0x402432
lea rax, [0x00413c7e]
jmp 0x402439
lea rax, str.Unknown_Port
add rsp, 0x20
pop rbp
ret
Function at 0x4027c3
Capabilities:
Connect socket
Convert ip address from string
Get socket status

Disassembly:
push rbp
sub rsp, 0x270
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x200], ecx
mov qword [rbp + 0x208], rdx
mov dword [rbp + 0x210], r8d
mov dword [rbp + 0x218], r9d
mov word [rbp + 0x1d0], 2
mov eax, dword [rbp + 0x210]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x1d2], ax
lea rax, [rbp + 0x1d0]
lea rdx, [rax + 4]
mov rax, qword [rbp + 0x208]
mov r8, rdx
mov rdx, rax
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_inet_pton]
call rax
lea rax, [rbp + 0x1d0]
add rax, 8
mov r8d, 8
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp + 0x200]
cdqe
lea rdx, [rbp + 0x1d0]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x1e8], eax
cmp dword [rbp + 0x1e8], 0
jns 0x4029a0
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
cmp eax, 0x70
jne 0x402999
mov eax, dword [rbp + 0x218]
mov dword [rbp - 0x48], eax
mov dword [rbp - 0x44], 0
mov dword [rbp - 0x40], 0
mov dword [rbp + 0x1ec], 0
jmp 0x4028e0
mov eax, dword [rbp + 0x1ec]
mov rdx, qword [rbp + rax*8 - 0x38]
mov eax, dword [rbp + 0x200]
cdqe
cmp rdx, rax
je 0x4028eb
add dword [rbp + 0x1ec], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jb 0x4028c1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x1ec], eax
jne 0x40291b
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x40291b
mov eax, dword [rbp + 0x200]
movsxd rdx, eax
mov eax, dword [rbp + 0x1ec]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0x200]
add eax, 1
lea rcx, [rbp - 0x40]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov edx, 0
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
test eax, eax
jle 0x402992
mov dword [rbp - 0x4c], 4
mov eax, dword [rbp + 0x200]
cdqe
lea rcx, [rbp - 0x50]
lea rdx, [rbp - 0x4c]
mov qword [rsp + 0x20], rdx
mov r9, rcx
mov r8d, 0x1007
mov edx, 0xffff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getsockopt]
call rax
mov eax, dword [rbp - 0x50]
test eax, eax
je 0x4029a0
mov eax, 0
jmp 0x4029a5
mov eax, 0
jmp 0x4029a5
mov eax, 0
jmp 0x4029a5
mov eax, 1
add rsp, 0x270
pop rbp
ret
Function at 0x4029ae
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rbp
sub rsp, 0x230
lea rbp, [rsp + 0x80]
call sym.getIPAddress
lea rax, [rbp - 0x60]
mov r8d, 0x200
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [0x00418040]
test eax, eax
je 0x4029fb
mov eax, dword [0x00418040]
mov ecx, eax
call sym.close
mov dword [0x00418040], 0
mov eax, dword [0x004128f8]
test eax, eax
jne 0x402a11
mov dword [0x004128f8], 0
jmp 0x402a20
mov eax, dword [0x004128f8]
add eax, 1
mov dword [0x004128f8], eax
mov eax, dword [0x004128f8]
cdqe
lea rdx, [rax*8]
lea rax, [0x004128f0]
mov rdx, qword [rdx + rax]
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strcpy
mov dword [rbp + 0x1ac], 0x1b46
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
test rax, rax
je 0x402acb
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
add rax, 1
mov rcx, rax
call sym.atoi
mov dword [rbp + 0x1ac], eax
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
mov byte [rax], 0
mov eax, dword [0x004128f8]
cdqe
lea rdx, [rax*8]
lea rax, [0x004128f0]
mov rax, qword [rdx + rax]
mov rdx, rax
lea rax, str.IP_address:__s_n
mov rcx, rax
call sym.printf
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [0x00418040], eax
mov eax, dword [0x00418040]
mov ecx, dword [rbp + 0x1ac]
lea rdx, [rbp - 0x60]
mov r9d, 0x1e
mov r8d, ecx
mov ecx, eax
call sym.connectTimeout
test eax, eax
jne 0x402b15
mov eax, 1
jmp 0x402b1a
mov eax, 0
add rsp, 0x230
pop rbp
ret

Function at 0x402b23
Capabilities:
Get hostname
Resolve dns

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
lea rax, [rbp - 0x60]
mov edx, 0x50
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostname]
call rax
cmp eax, 0xffffffff
jne 0x402b4f
mov eax, 0
jmp 0x402b8f
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x402b71
mov eax, 0
jmp 0x402b8f
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp - 0x64], eax
mov eax, dword [rbp - 0x64]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
add rsp, 0x90
pop rbp
ret
Function at 0x4034a0
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x403510
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0041c0f4]
test esi, esi
mov rbx, rcx
jle 0x403640
mov rax, qword [0x0041c0f8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x40355b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x4035e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x403540
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x403662
mov rax, qword [0x0041c0f8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x0041c0f8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x403647
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4035de
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x4035f0
add dword [0x0041c0f4], 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 [0x0041c0f8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4035de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x403568
mov rax, qword [0x0041c0f8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x403c00
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x0041c160]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0041c140]
test rbx, rbx
je 0x403c5c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x403c53
test eax, eax
jne 0x403c53
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x403c38
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 0x403e70
Capabilities:
Parse pe header

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

Function at 0x403ea0
Capabilities:
Enumerate pe sections

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

Function at 0x403ef0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x403f80
mov rdx, qword [0x00414900]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x403f6e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x403f6e
cmp word [rax + 0x18], 0x20b
jne 0x403f6e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x403f80
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x403f59
add rbx, 0x28
cmp rbx, rdi
je 0x403f80
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x403f50
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

Disassembly:
mov rdx, qword [0x00414900]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x403fb0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x403fb8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x403fb0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x40400d
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 0x404004
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403fb0
add rax, 0x28
cmp rax, r9
jne 0x403ff0
xor eax, eax
ret

Function at 0x404010
Capabilities:
Parse pe header

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

Function at 0x404050
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x00414900]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x404070
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x404078
ret
cmp word [rdx + 0x18], 0x20b
jne 0x404070
movzx r8d, word [rdx + 6]
movzx eax, word [rdx + 0x14]
test r8w, r8w
lea rax, [rdx + rax + 0x18]
je 0x4040c0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x4040b7
test rcx, rcx
je 0x404070
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x4040a8
xor eax, eax
ret
Function at 0x4040d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x00414900]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x4040ef
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x4040f8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x00414900]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x404130
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x404138
ret
cmp word [r8 + 0x18], 0x20b
jne 0x404130
movzx r9d, word [r8 + 6]
sub rcx, rdx
movzx edx, word [r8 + 0x14]
test r9w, r9w
lea rdx, [r8 + rdx + 0x18]
je 0x404130
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x404184
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x404190
add rdx, 0x28
cmp rdx, r9
jne 0x404170
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x00414900]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x4041c2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x4041d0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x4041c2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x4041c2
movzx r10d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
test r10w, r10w
lea rdx, [r8 + rdx + 0x18]
je 0x4041c2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
cmp rax, r9
mov r8, r9
jb 0x404225
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x404238
add rdx, 0x28
cmp r10, rdx
jne 0x404210
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x404247
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x404257
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40422e
test ecx, ecx
jg 0x404240
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x2fc4d2aa0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d3b80
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d34a2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f6108]
test eax, eax
je 0x2fc4d353a
lea rax, [0x2fc4f60e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f6110]
mov qword [rbp - 8], rax
jmp 0x2fc4d351e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d3512
cmp qword [rbp - 0x10], 0
je 0x2fc4d3512
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d34d8
lea rax, [0x2fc4f60e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d353b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d3640
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d3668
mov eax, 0
jmp 0x2fc4d36b6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d3691
mov eax, 0
jmp 0x2fc4d36b6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d36b1
mov eax, 0
jmp 0x2fc4d36b6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d36bc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4d373a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d3731
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4d3731
mov rax, qword [rbp - 8]
jmp 0x2fc4d374f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4d3704
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001a50
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001a9a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001a9a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001a9a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001a9a
cmp dword [rcx + 0x84], 0xe
jbe 0x140001a9a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001a9c
xor al, al
add rsp, 0x28
ret

Function at 0x140005b48
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140005944