joyce8/EMBER2024-capa huggingface dataset:
Function at 0x7ff698fce290
Capabilities:
Check http status code

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
lea eax, [rdx - 0xc8]
mov rdi, rcx
mov rcx, qword [rcx]
mov esi, r8d
cmp eax, 0x64
jb 0x7ff698fce2c5
lea rdx, [0x7ff698ff91d0]
call fcn.7ff698fb05d0
lea eax, [rbx + 0x11]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
cmp edx, 0xc8
je 0x7ff698fce2dc
mov r8d, edx
lea rdx, [0x7ff698ff91f0]
call fcn.7ff698fb0750
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], r14
cmp esi, 0x13
jne 0x7ff698fce2f8
mov rcx, rdi
call fcn.7ff698fce1d0
jmp 0x7ff698fce42f
cmp esi, 0x14
jne 0x7ff698fce411
mov rsi, qword [rdi]
mov rbp, rbx
cmp dword [rsi + 0xba0], 2
jne 0x7ff698fce379
mov rax, qword [rsi + 0x1e0]
mov rdx, qword [rax]
test rdx, rdx
je 0x7ff698fce379
mov byte [rsp + 0x28], 1
lea r9, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov qword [rsp + 0x50], rbx
call fcn.7ff698f99d30
test eax, eax
jne 0x7ff698fce42f
mov rcx, qword [rsp + 0x50]
lea edx, [rax + 0x2f]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x7ff698fce36e
mov rbp, qword [rsp + 0x50]
mov ecx, 1
sub rax, rbp
cmovne rcx, rax
mov byte [rcx + rbp], bl
jmp 0x7ff698fce379
mov rcx, qword [rsp + 0x50]
call qword [fcn.7ff698feaab8]
mov rdx, qword [rsi + 0xc08]
test rdx, rdx
jne 0x7ff698fce39d
cmp byte [rsi + 0xf0d], bl
lea rax, [0x7ff698ff8e70]
lea rdx, [0x7ff698ff7fbc]
cmovne rdx, rax
lea r8, [0x7ff698ffda5e]
test rbp, rbp
mov r9, r8
lea rax, [0x7ff69900c02c]
cmovne r9, rbp
lea rcx, [0x7ff698ff3898]
cmovne r8, rax
call fcn.7ff698f9ef50
mov rcx, rbp
mov r14, rax
call qword [fcn.7ff698feaab8]
test r14, r14
jne 0x7ff698fce3dc
lea ebx, [r14 + 0x1b]
jmp 0x7ff698fce431
lea rcx, [rdi + 0xa00]
mov r8, r14
lea rdx, [0x7ff698ffe8a8]
call fcn.7ff698fe43f0
mov rcx, r14
mov esi, eax
call qword [fcn.7ff698feaab8]
test esi, esi
je 0x7ff698fce405
mov ebx, esi
jmp 0x7ff698fce431
mov dword [rdi + 0xab8], 0x1f
jmp 0x7ff698fce431
cmp esi, 0x15
jne 0x7ff698fce41c
lea r8d, [rsi - 8]
jmp 0x7ff698fce425
cmp esi, 0x16
jne 0x7ff698fce431
lea r8d, [rsi - 8]
mov dl, 1
mov rcx, rdi
call fcn.7ff698fcdd00
mov ebx, eax
mov r14, qword [rsp + 0x60]
mov eax, ebx
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
Function at 0x7ff698fd3d20
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x7ff698fd3e44
cmp r8d, 0xff
jne 0x7ff698fd3d81
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x7ff698fd3d6b
lea r8, [0x7ff698f00000]
mov r9, qword [r8 + r10*8 + 0xf9bc0]
mov r8, rdx
lea rdx, [0x7ff698ffa648]
add rsp, 0x38
jmp fcn.7ff698fb0750
mov r8, rdx
mov r9d, r10d
lea rdx, [0x7ff698ffa658]
add rsp, 0x38
jmp fcn.7ff698fb0750
cmp r8d, 0xfb
jne 0x7ff698fd3d93
lea r9, [0x7ff698ffa5d4]
jmp 0x7ff698fd3dd1
cmp r8d, 0xfc
jne 0x7ff698fd3da5
lea r9, [0x7ff698ffa5dc]
jmp 0x7ff698fd3dd1
cmp r8d, 0xfd
jne 0x7ff698fd3db7
lea r9, [0x7ff698ffa5e4]
jmp 0x7ff698fd3dd1
xor r9d, r9d
lea rax, [0x7ff698ffa5e8]
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x7ff698fd3e2d
cmp r10d, 0x27
jg 0x7ff698fd3e04
lea r8, [0x7ff698f00000]
mov r8, qword [r8 + r10*8 + 0xfa1e0]
test r8, r8
jne 0x7ff698fd3e14
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, [0x7ff698ffa680]
call fcn.7ff698fb0750
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x7ff698fd3deb
lea r8, [0x7ff698ffa664]
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, [0x7ff698ffa670]
call fcn.7ff698fb0750
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, [0x7ff698ffa690]
call fcn.7ff698fb0750
add rsp, 0x38
ret

Function at 0x7ff698fd4190
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.ws2_32.dll_send]
test eax, eax
jns 0x7ff698fd41ef
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
lea rdx, [0x7ff698ffa6a0]
mov rcx, rbp
mov r8d, eax
call fcn.7ff698fb05d0
mov rcx, qword [rbx]
lea rdx, [0x7ff698ffa6bc]
mov r9d, edi
mov r8d, esi
call fcn.7ff698fd3d20
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x7ff698fd43a0
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x7ff698fd4548
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x7ff698fd4405
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x7ff698fd4405
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x7ff698fd4405
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.ws2_32.dll_htons_1]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.ws2_32.dll_htons_1]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x7ff698fd443c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x7ff698fd4492
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x7ff698fd4492
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x7ff698fd4492
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x7ff698fd4492
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x7ff698fd4492
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.7ff698fd3e50
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.ws2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x7ff698fd44f4
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
lea rdx, [0x7ff698ffa6a0]
mov rcx, rbp
mov r8d, eax
call fcn.7ff698fb05d0
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.7ff698fd4220
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.ws2_32.dll_send]
test eax, eax
jns 0x7ff698fd4540
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
lea rdx, [0x7ff698ffa6a0]
mov rcx, rbp
mov r8d, eax
call fcn.7ff698fb05d0
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x7ff698fd5cb0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x7ff69902b080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ws2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x7ff698fd5d45
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x7ff698fd5da6
lea rdx, [0x7ff698ffaf30]
mov rcx, rdi
call fcn.7ff698fb05d0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.7ff698fe98c0
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x7ff698fd5e61
sub ecx, 1
je 0x7ff698fd5ed4
sub ecx, 1
je 0x7ff698fd5e10
cmp ecx, 1
je 0x7ff698fd5df3
lea r8, [0x7ff698ffaf60]
mov rcx, rdi
lea rdx, [0x7ff698ffe8a8]
call fcn.7ff698fb05d0
jmp 0x7ff698fd5ed4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.7ff698fd59e0
test eax, eax
je 0x7ff698fd5ed4
jmp 0x7ff698fd5d7a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x7ff698fd5ed4
sub rax, rsi
cmp rax, rbp
jae 0x7ff698fd5ed4
mov r8, rsi
lea rdx, [0x7ff698ffaf50]
mov rcx, rdi
call fcn.7ff698fb0750
jmp 0x7ff698fd5ed4
cmp r8d, 4
jle 0x7ff698fd5ed4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x7ff698fd5ed4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.7ff698fb04f0
mov esi, eax
test eax, eax
je 0x7ff698fd5eb3
mov edx, 5
mov rcx, rbx
call fcn.7ff698fd69a0
mov eax, esi
jmp 0x7ff698fd5d7a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.7ff698fbedd0
mov rcx, r14
call fcn.7ff698fbf0b0
test eax, eax
je 0x7ff698fd5d78
mov edx, 5
mov rcx, rbx
call fcn.7ff698fd69a0
mov eax, 0x2a
jmp 0x7ff698fd5d7a
Function at 0x7ff698fe8c70
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.ucrtbase.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x7ff698fe8cb2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x7ff698fe8cf9
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + 8]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + 0x10]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x7ff698fe8d52
mov rsi, rbp
nop dword [rax + rax]
movzx eax, 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 + 8]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + 8]
sub rbp, 1
jne 0x7ff698fe8d10
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x7ff698fe8d93
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x7ff698ffd772]
mov r8d, 1
call qword [rbx + 8]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x7ff698ffd773]
mov r8d, 1
call qword [rbx + 8]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x7ff698fe8d60
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x7ff698fe8e0c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, [0x7ff698ffd8b0]
mov r9d, 2
call qword [sym.imp.kernel32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x7ff698fe8e46
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x7ff698fe8e4b
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.kernel32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x7ff698fe8e94
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x7ff698ffd7b0]
cmp byte [rcx + rax], 0
je 0x7ff698fe8e94
dec r8
sub rdx, 1
jne 0x7ff698fe8e7a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x7ff698fe95e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rdx, rcx
mov ecx, 0x105
call fcn.7ff698fe8eac
mov ebx, eax
test eax, eax
jne 0x7ff698fe9610
and dword [rsp + 0x38], eax
call qword [sym.imp.kernel32.dll_GetLastError]
mov dword [rsp + 0x3c], eax
jmp 0x7ff698fe9673
mov rcx, rdi
call qword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x7ff698fe966a
test al, 0x10
je 0x7ff698fe966a
bt eax, 0xa
jae 0x7ff698fe9663
mov r9d, 0x2000000
lea rcx, [rsp + 0x38]
mov r8d, 0x80
mov rdx, rdi
call fcn.7ff698fe9684
mov rcx, qword [rsp + 0x38]
mov edi, eax
cmp rcx, 0xffffffffffffffff
je 0x7ff698fe965f
call qword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x7ff698fe965f
call qword [sym.imp.ucrtbase.dll_abort]
int3
test edi, edi
jne 0x7ff698fe966a
and dword [rsp + 0x3c], 0
jmp 0x7ff698fe966f
or dword [rsp + 0x3c], 0xffffffff
mov dword [rsp + 0x38], ebx
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x7ff698fea744
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
test rax, rax
je 0x7ff698fea78e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x7ff698fea78e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x7ff698fea78e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x7ff698fea78e
cmp dword [rcx + 0x84], 0xe
jbe 0x7ff698fea78e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x7ff698fea790
xor al, al
add rsp, 0x28
ret
Function at 0x140078ca0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x140078cad
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x140078cbd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140078ca5
lea eax, [rcx + 1]
jmp 0x140078ccb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x140078cde
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x140078cc4
sub eax, 3
jb 0x140078cfe
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x140078d4d
sar eax, 1
movsxd rbp, eax
jb 0x140078d34
jmp 0x140078d0c
add ebx, ebx
jne 0x140078d0a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140078d34
inc ecx
add ebx, ebx
jne 0x140078d1a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140078d34
call r11
adc ecx, ecx
add ebx, ebx
jne 0x140078d2d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x140078d1c
add ecx, 2
jmp 0x140078d39
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.140078c62
jmp 0x140078cad
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x4e200
mov dl, 6
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x140078d9d
cmp rsi, rcx
jae 0x140078da5
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x140078d84
cmp al, 0x8f
ja 0x140078d84
cmp byte [rsi - 2], 0xf
je 0x140078d8a
sub al, 0xe8
cmp al, 1
ja 0x140078d6e
cmp rsi, rcx
jae 0x140078da5
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x140078d74
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x140078da5
lodsb al, byte [rsi]
jmp 0x140078d84
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x74000]
mov eax, dword [rdi]
or eax, eax
je 0x140078e0e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x791dc]
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 0x140078db2
jns 0x140078de7
movzx rdx, word [rdi]
add rdi, 2
jmp 0x140078df1
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 0x140078e08
mov qword [rbx], rax
add rbx, 8
jmp 0x140078dd2
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 0x140078e48
cmp al, 0xef
ja 0x140078e3a
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x140078e1a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x140078e29
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 + 0x21f]
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
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140078e9c
sub rsp, 0xffffffffffffff80
jmp 0x140049b7c
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00405500]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00405510]
mov dword [rax], 1
mov rax, qword [0x00405520]
mov dword [rax], 1
mov rax, qword [0x004054f0]
mov dword [rax], 1
mov rax, qword [0x004053e0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004054e0]
mov dword [0x00408008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004054a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00405390]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x401794
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
lea rax, str.out.ppm
mov qword [rbp - 0x10], rax
lea rax, [0x0040501c]
mov qword [rbp - 0x18], rax
mov dword [rbp - 0x1c], 0xff
mov rax, qword [rbp - 0x10]
lea rdx, [0x0040501f]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x28], rax
mov rcx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x28]
mov edx, dword [rbp - 0x1c]
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], 0x190
mov r9d, 0x258
mov r8, rcx
lea rdx, str.P6_n__s_n__d_n__d_n__d_n
mov rcx, rax
call sym.fprintf
mov dword [rbp - 4], 0
jmp 0x4018e9
mov dword [rbp - 8], 0
jmp 0x4018d8
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov eax, dword [rbp - 8]
movsxd rcx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 2
imul rdx, rcx, 0x12c0
add rdx, rax
lea rax, [0x00408040]
add rax, rdx
mov eax, dword [rax]
mov byte [0x006c7240], al
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov eax, dword [rbp - 8]
movsxd rcx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 2
imul rdx, rcx, 0x12c0
add rdx, rax
lea rax, [0x00408044]
add rax, rdx
mov eax, dword [rax]
mov byte [0x006c7241], al
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov eax, dword [rbp - 8]
movsxd rcx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 2
imul rdx, rcx, 0x12c0
add rdx, rax
lea rax, [0x00408048]
add rax, rdx
mov eax, dword [rax]
mov byte [0x006c7242], al
mov rax, qword [rbp - 0x28]
mov r9, rax
mov r8d, 3
mov edx, 1
lea rcx, [0x006c7240]
call sym.fwrite
add dword [rbp - 8], 1
cmp dword [rbp - 8], 0x257
jle 0x401817
add dword [rbp - 4], 1
cmp dword [rbp - 4], 0x18f
jle 0x40180b
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.fclose
nop
add rsp, 0x60
pop rbp
ret
Function at 0x402220
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x006c7844]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4023a8
mov rax, qword [0x006c7848]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40226c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4022f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x402250
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x4023dd
mov rax, qword [0x006c7848]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x006c7848]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4023c0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4022ee
sub eax, 0x40
and eax, 0xffffffbf
jne 0x402350
add dword [0x006c7844], 1
cmp edi, 8
jae 0x402323
test dil, 4
jne 0x402394
test edi, edi
je 0x402318
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4023af
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x402318
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40233c
jmp 0x402318
add rsi, qword [0x006c7848]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4022ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x402318
xor esi, esi
jmp 0x402277
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402318
mov rax, qword [0x006c7848]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x402b30
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x006c7b20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x006c7b00]
test rbx, rbx
je 0x402b84
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x402b7b
test rsi, rsi
je 0x402b7b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402b60
lea rcx, [0x006c7b20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]