joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180004060
Capabilities:
Connect socket
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
mov qword [rax + 0x20], r13
push rbp
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x130
movzx r15d, r8w
mov r12d, edx
mov rsi, rcx
call fcn.180003588
mov r14d, eax
cmp eax, 0xffffffff
je 0x180004181
xor r8d, r8d
lea r13d, [r8 + 2]
mov ecx, r13d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800040c6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x180004181
movzx ecx, word [rsi + 0x30]
mov dword [rsp + 0x24], r14d
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x20], r13w
lea rdx, [rsp + 0x20]
mov word [rsp + 0x22], ax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
xor esi, esi
test eax, eax
jne 0x180004172
xor edx, edx
lea rcx, [rsp + 0x38]
mov r8d, 0xf8
call fcn.180004610
movzx ecx, r15w
mov word [rsp + 0x30], 0x104
mov dword [rsp + 0x34], r12d
call qword [sym.imp.WS2_32.dll_htons]
xor r9d, r9d
lea r8d, [rsi + 9]
lea rdx, [rsp + 0x30]
mov word [rsp + 0x32], ax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x180004172
mov r8d, 0x100
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.180004348
cmp eax, 8
jne 0x180004178
cmp byte [rsp + 0x31], 0x5a
jne 0x180004178
cmp dword [rsp + 0x34], esi
je 0x180004178
cmp word [rsp + 0x32], si
je 0x180004178
mov rax, rdi
jmp 0x180004185
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
lea r11, [rsp + 0x130]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov r12, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1800041a8
Capabilities:
Connect socket
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
mov qword [rax + 0x20], r13
push rbp
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x130
movzx r15d, r8w
mov r12d, edx
mov rsi, rcx
call fcn.180003588
mov r14d, eax
cmp eax, 0xffffffff
je 0x180004320
xor r8d, r8d
lea r13d, [r8 + 2]
mov ecx, r13d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x18000420e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x180004320
movzx ecx, word [rsi + 0x30]
mov dword [rsp + 0x24], r14d
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x20], r13w
lea rdx, [rsp + 0x20]
mov word [rsp + 0x22], ax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
xor esi, esi
test eax, eax
jne 0x180004311
xor edx, edx
lea rcx, [rsp + 0x32]
mov r8d, 0xfe
call fcn.180004610
xor r9d, r9d
mov word [rsp + 0x30], 0x105
lea r8d, [rsi + 3]
mov rcx, rdi
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x180004311
mov r14d, 0x100
lea rdx, [rsp + 0x30]
mov r8d, r14d
mov rcx, rdi
call fcn.180004348
cmp eax, r13d
jne 0x180004317
cmp byte [rsp + 0x30], 5
jne 0x180004317
cmp byte [rsp + 0x31], sil
jne 0x180004317
movzx ecx, r15w
mov dword [rsp + 0x30], 0x1000105
mov dword [rsp + 0x34], r12d
call qword [sym.imp.WS2_32.dll_htons]
xor r9d, r9d
lea r8d, [rsi + 0xa]
lea rdx, [rsp + 0x30]
mov word [rsp + 0x38], ax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x180004311
mov r8d, r14d
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.180004348
cmp eax, 0xa
jne 0x180004317
cmp byte [rsp + 0x30], 5
jne 0x180004317
cmp byte [rsp + 0x31], sil
jne 0x180004317
cmp dword [rsp + 0x34], esi
je 0x180004317
cmp word [rsp + 0x38], si
je 0x180004317
mov rax, rdi
jmp 0x180004324
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
lea r11, [rsp + 0x130]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov r12, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x180004348
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
push rdi
sub rsp, 0x450
and dword [r11 + 0x20], 0
lea r9, [rsp + 0x30]
mov eax, 1
mov qword [r11 - 0x210], rcx
mov dword [rsp + 0x240], eax
mov rsi, rdx
mov dword [rsp + 0x30], eax
lea rdx, [r11 - 0x218]
lea rax, [r11 + 0x20]
movsxd rdi, r8d
mov rbx, rcx
mov qword [rsp + 0x38], rcx
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov dword [r11 + 0x24], 0x2710
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x180004405
test eax, eax
jle 0x18000440b
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x18000440b
lea rdx, [rsp + 0x240]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18000440b
mov r8, rdi
xor edx, edx
mov rcx, rsi
call fcn.180004610
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x180004405
test eax, eax
jne 0x18000440e
jmp 0x18000440b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
or eax, 0xffffffff
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret

Function at 0x180004424
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
test r8d, r8d
jle 0x18000449b
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
mov rdi, rdx
movsxd rbx, r8d
mov r11, rcx
mov r10b, byte [r11 + 0x100]
inc r10b
movzx r8d, r10b
movzx edx, byte [r8 + r11]
mov r9b, dl
add r9b, byte [r11 + 0x101]
movzx ecx, r9b
mov al, byte [rcx + r11]
mov byte [r8 + r11], al
mov byte [rcx + r11], dl
movzx ecx, byte [r8 + r11]
add rcx, rdx
movzx eax, cl
mov cl, byte [rax + r11]
xor byte [rdi], cl
inc rdi
mov byte [r11 + 0x100], r10b
mov byte [r11 + 0x101], r9b
sub rbx, 1
jne 0x18000443c
mov rbx, qword [rsp + 8]
mov rdi, qword [rsp + 0x10]
ret
Function at 0x142d8a058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.142d8a1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x142d8a089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x142d8a06f
add dl, dl
jne 0x142d8a096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x142d8a0f6
xor eax, eax
add dl, dl
jne 0x142d8a0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x142d8a1ad
add dl, dl
jne 0x142d8a0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x142d8a0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x142d8a0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x142d8a0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x142d8a0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x142d8a07e
mov eax, 1
add dl, dl
jne 0x142d8a106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x142d8a113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x142d8a0fb
sub eax, ebx
mov ebx, 1
jne 0x142d8a14c
mov ecx, 1
add dl, dl
jne 0x142d8a12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x142d8a13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x142d8a123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x142d8a07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x142d8a168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x142d8a175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x142d8a15d
cmp eax, 0x7d00
jae 0x142d8a19b
cmp eax, 0x500
jb 0x142d8a196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x142d8a07e
cmp eax, 0x7f
ja 0x142d8a19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x142d8a07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x142d8a1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x142d8a07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1437705b0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x1437705bd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1437705cd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1437705b5
lea eax, [rcx + 1]
jmp 0x1437705db
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1437705ee
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1437705d4
sub eax, 3
jb 0x14377060e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14377065d
sar eax, 1
movsxd rbp, eax
jb 0x143770644
jmp 0x14377061c
add ebx, ebx
jne 0x14377061a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x143770644
inc ecx
add ebx, ebx
jne 0x14377062a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x143770644
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14377063d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14377062c
add ecx, 2
jmp 0x143770649
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.143770572
jmp 0x1437705bd
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x375a000]
mov eax, dword [rdi]
or eax, eax
je 0x1437706b9
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x37716f4]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x143770669
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1437706b3
mov qword [rbx], rax
add rbx, 8
jmp 0x143770689
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x1437706fd
cmp al, 0xef
ja 0x1437706e5
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x1437706c5
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x1437706d4
mov eax, dword [rdi]
add rdi, 4
jmp 0x1437706d4
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
mov byte [fcn.14377077c], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.14377077c
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14377076c
sub rsp, 0xffffffffffffff80
jmp 0x1400013d0
Function at 0x1800027f0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x20
mov rbx, r9
mov dword [rsp + 0x30], 0
mov rdi, rdx
lea r9, [rsp + 0x30]
mov rsi, r8
mov rdx, rbx
mov rcx, rdi
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18000286e
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.180008900
cmp dword [rsp + 0x30], 0x40
je 0x18000285c
lea r9, [rsp + 0x30]
mov r8d, 0x40
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov al, 1
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
xor al, al
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x180002980
Capabilities:
Create thread

Disassembly:
push r15
sub rsp, 0x2a0
mov rax, qword [0x18001e008]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov r15, rcx
mov dword [rsp + 0x40], 0x104
mov rcx, qword [rcx + 0x10]
lea r8, [rsp + 0x48]
mov qword [rsp + 0x30], r8
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x28], r8
lea r8, [rsp + 0x60]
mov rax, qword [rcx]
mov qword [rsp + 0x20], r8
mov r8d, 0x104
call qword [rax + 0xd0]
test eax, eax
jne 0x180002b39
cmp dword [rsp + 0x40], 0x104
ja 0x180002b39
mov qword [rsp + 0x2c0], rbx
lea rbx, [r15 + 0x73c]
mov qword [rsp + 0x298], rsi
mov qword [rsp + 0x290], rdi
xor edi, edi
mov qword [rsp + 0x288], r12
xor esi, esi
mov r12, qword [rsp + 0x48]
mov qword [rsp + 0x2c8], rbp
mov qword [rsp + 0x280], r14
cmp dword [rbx], 0
jne 0x180002ab5
mov eax, esi
imul rbp, rax, 0x724
lea rax, [rsp + 0x60]
add rbp, r15
lea r8, [rbp + 0x1c]
sub r8, rax
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x180002a67
add rax, 2
test ecx, ecx
jne 0x180002a53
test edx, edx
jne 0x180002ab7
movzx eax, byte [rbx - 0x108]
lea r9, [rbp + 0x42c]
movzx r14d, byte [rbx - 3]
lea r8, [rbp + 0x224]
mov rdx, r12
mov dword [rsp + 0x20], eax
mov rcx, r15
call fcn.180002500
test rax, rax
je 0x180002ab7
mov r9d, r14d
lea r8, [rbp + 0x635]
mov rdx, rax
call fcn.1800027f0
test al, al
je 0x180002ab7
mov dword [rbx], 1
inc edi
inc esi
add rbx, 0x724
cmp esi, 0xd
jb 0x180002a32
mov r14, qword [rsp + 0x280]
cmp edi, 0xd
mov rdi, qword [rsp + 0x290]
mov r12, qword [rsp + 0x288]
mov rsi, qword [rsp + 0x298]
mov rbp, qword [rsp + 0x2c8]
mov rbx, qword [rsp + 0x2c0]
jne 0x180002b39
cmp byte [r15 + 0x18], 0
jne 0x180002b39
mov r9, qword [r15 + 0x10]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea r8, [0x1800024a0]
xor edx, edx
mov dword [rsp + 0x20], 0
xor ecx, ecx
mov byte [r15 + 0x18], 1
mov dword [rsp + 0x44], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.180002b70
add rsp, 0x2a0
pop r15
ret
Function at 0x18000d0d0
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 0x18000d100
xor eax, eax
jmp 0x18000d1c3
mov rbp, rbx
cmp word [rax], si
je 0x18000d125
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18000d10c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18000d108
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.18000cff0
movsxd r14, eax
test eax, eax
jne 0x18000d163
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18000d0f9
mov rcx, r14
call fcn.18000a628
mov rdi, rax
test rax, rax
jne 0x18000d17c
xor ecx, ecx
call fcn.18000a5ec
jmp 0x18000d158
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.18000cff0
test eax, eax
jne 0x18000d1ad
mov rcx, rdi
call fcn.18000a5ec
jmp 0x18000d1b7
xor ecx, ecx
call fcn.18000a5ec
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 0x180012180
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1800121a8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1800121a8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x401910
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.00407a60
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.00407a60
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 0x401980
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x0040c0c4]
mov r12, rcx
test ebx, ebx
jle 0x401ab0
mov rax, qword [0x0040c0c8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x4019cc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401a53
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x4019b0
mov rcx, r12
call fcn.00402330
mov rsi, rax
test rax, rax
je 0x401ad2
mov rax, qword [0x0040c0c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.00402460
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0040c0c8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401ab7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401a4c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x401a60
add dword [0x0040c0c4], 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 [0x0040c0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401a4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00401910
nop dword [rax]
xor ebx, ebx
jmp 0x4019d7
mov rax, qword [0x0040c0c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.00401910
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00401910
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x401fa0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040c120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040c100]
test rbx, rbx
je 0x401ff4
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 0x401feb
test r12, r12
je 0x401feb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x401fd0
lea rcx, [0x0040c120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402330
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x004096e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x402350
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x402358
ret
cmp word [r8 + 0x18], 0x20b
jne 0x402350
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x4023a5
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x40239c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402350
add rax, 0x28
cmp rax, r9
jne 0x402388
xor eax, eax
ret

Function at 0x4023b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x004096e0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x4023d0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4023d8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x4023d0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x402460
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x004096e0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x402480
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x402488
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140001cf0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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.140007b10
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.140007b10
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 0x140001d60
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000d0a4]
mov rbx, rcx
test esi, esi
jle 0x140001e90
mov rax, qword [0x14000d0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001dab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001e35
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001d90
mov rcx, rbx
call fcn.1400027d0
mov rdi, rax
test rax, rax
je 0x140001eb2
mov rax, qword [0x14000d0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002910
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000d0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001e97
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001e2e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001e40
add dword [0x14000d0a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14000d0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001e2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001cf0
nop dword [rax]
xor esi, esi
jmp 0x140001db8
mov rax, qword [0x14000d0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001cf0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001cf0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002440
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000d100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000d0e0]
test rbx, rbx
je 0x14000249c
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 0x140002493
test eax, eax
jne 0x140002493
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002478
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 0x1400027d0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140002850
Capabilities:
Parse pe header

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

Function at 0x140002910
Capabilities:
Parse pe header

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