joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140062ee0
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x50
mov edi, r8d
mov r13, rdx
mov r14, rcx
call fcn.140056b80
xor ebx, ebx
cmp qword [0x140253418], rbx
mov rbp, rax
mov dword [rsp + 0x98], ebx
mov dword [rsp + 0x30], ebx
jne 0x14006300c
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rsi, rax
je 0x14006311f
lea rdx, [0x14006e520]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14006311f
mov rcx, rax
call fcn.140056ab0
lea rdx, [0x14006e510]
mov rcx, rsi
mov qword [0x140253418], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140056ab0
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x140253420], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140056ab0
lea rcx, [rsp + 0x98]
mov qword [0x140253428], rax
call fcn.1400543d0
test eax, eax
je 0x140062fbf
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.1400532e0
cmp dword [rsp + 0x98], 2
jne 0x14006300c
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140056ab0
test rax, rax
mov qword [0x140253438], rax
je 0x14006300c
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140056ab0
mov qword [0x140253430], rax
mov rcx, qword [0x140253430]
mov qword [rsp + 0x80], r12
cmp rcx, rbp
je 0x1400630b8
cmp qword [0x140253438], rbp
je 0x1400630b8
call fcn.140056c70
mov rcx, qword [0x140253438]
mov rsi, rax
call fcn.140056c70
test rsi, rsi
mov r12, rax
je 0x1400630b8
test rax, rax
je 0x1400630b8
call rsi
test rax, rax
je 0x140063083
lea rcx, [rsp + 0x34]
mov r9d, SafeArrayGetDim
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x140063083
test byte [rsp + 0x40], 1
jne 0x1400630b8
lea rcx, [rsp + 0x30]
call fcn.140054420
test eax, eax
je 0x1400630a5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.1400532e0
cmp dword [rsp + 0x30], 4
jb 0x1400630b2
bts edi, 0x15
jmp 0x1400630f6
bts edi, 0x12
jmp 0x1400630f6
mov rcx, qword [0x140253420]
cmp rcx, rbp
je 0x1400630f6
call fcn.140056c70
test rax, rax
je 0x1400630f6
call rax
test rax, rax
mov rbx, rax
je 0x1400630f6
mov rcx, qword [0x140253428]
cmp rcx, rbp
je 0x1400630f6
call fcn.140056c70
test rax, rax
je 0x1400630f6
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140253418]
call fcn.140056c70
mov r12, qword [rsp + 0x80]
test rax, rax
je 0x14006311f
mov r9d, edi
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x140063121
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
Function at 0x140065af0
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x38
mov rax, qword [0x1400980c0]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x20]
mov r9d, 6
mov edx, 0x1004
mov byte [rsp + 0x26], 0
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x140065b37
or eax, 0xffffffff
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140052840
add rsp, 0x38
ret
lea rcx, [rsp + 0x20]
call fcn.140054c70
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140052840
add rsp, 0x38
ret
Function at 0x1400695f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
push rbp
push r14
sub rsp, 0x20
xor ebx, ebx
test rcx, rcx
mov r14, rdx
mov rbp, rcx
je 0x1400696a4
movsxd rax, dword [rcx + 0x3c]
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rdi
mov edi, dword [rax + rcx + 0x88]
mov esi, ebx
add rdi, rcx
cmp dword [rdi + 0x18], ebx
jbe 0x14006969f
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r13
mov r13, rbx
mov r12, rbx
nop
nop
mov eax, dword [rdi + 0x20]
mov rdx, r14
add rax, r13
mov ecx, dword [rax + rbp]
add rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x14006966f
mov eax, dword [rdi + 0x24]
mov ecx, dword [rdi + 0x1c]
add rax, r12
add rcx, rbp
movzx edx, word [rax + rbp]
mov ebx, dword [rcx + rdx*4]
add rbx, rbp
add esi, 1
add r13, 4
add r12, 2
cmp esi, dword [rdi + 0x18]
jb 0x140069640
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
mov rax, rbx
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
pop rbp
pop rbx
ret
mov rax, rbx
jmp 0x14006968c
mov rax, rbx
add rsp, 0x20
pop r14
pop rbp
pop rbx
ret
Function at 0x1403409da
Capabilities:
Encode data using xor

Disassembly:
mov r13, qword [rsp + 0x18]
mov qword [rsp + 0x18], 0xffffffffb67cf50b
push qword [rsp + 0x10]
popfq
lea rsp, [rsp + 0x18]
call fcn.1404bc5cf
mov al, 0xe6
cmpsd dword [rsi], dword [rdi]
out 0x8c, al
jnp 0x140340a71
mov ah, 0x59
adc edi, esi
xchg byte [rcx], ch
invalid
stosd dword [rdi], eax
cmovl esi, dword [rbp - 0x57]
mov ah, 0x3a
xor dword [rcx], eax
add byte [rax], al
add byte [rdx - 0x4dfa7da6], dh
imul edi, dword [rbx - 0x69923200], 0x993990ed
invalid

Function at 0x140359a37
Capabilities:
Encode data using xor

Disassembly:
xor byte [rbp - 0x1fca64ae], bh
std
pop rdx
cmpsb byte [rsi], byte [rdi]
mov ebp, 0x2895f6a1
mov ebp, 0x585f6801
movabs r13, 0x120a764c1019346a
movabs r13, 0x120a764c1019346a
movabs r13, 0x120a764c1019346a
mov r13, qword [rsp + 0x20]
mov qword [rsp + 0x20], 0xffffffff991b3bc8
lea rsp, [rsp + 0x20]
call fcn.140556c06
pop rcx
push 0x4cb535d4
jns 0x140359a21
fidiv dword [rax - 0x6ed71fe]
pop rsp
and cl, byte [rcx + 0x7210291f]
adc cl, cl
invalid
Function at 0x530a50
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.00531820
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.00531820
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 0x530ac0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x006fa0c4]
mov r12, rcx
test ebx, ebx
jle 0x530bf0
mov rax, qword [0x006fa0c8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x530b0c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x530b93
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x530af0
mov rcx, r12
call fcn.00531470
mov rsi, rax
test rax, rax
je 0x530c12
mov rax, qword [0x006fa0c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.005315a0
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x006fa0c8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x530bf7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x530b8c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x530ba0
add dword [0x006fa0c4], 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 [0x006fa0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x530b8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00530a50
nop dword [rax]
xor ebx, ebx
jmp 0x530b17
mov rax, qword [0x006fa0c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.00530a50
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00530a50
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x5310e0
Capabilities:
Get thread local storage value

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

Disassembly:
mov rdx, qword [0x006f7840]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x531490
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x531498
ret
cmp word [r8 + 0x18], 0x20b
jne 0x531490
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x5314e5
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 0x5314dc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x531490
add rax, 0x28
cmp rax, r9
jne 0x5314c8
xor eax, eax
ret

Function at 0x5314f0
Capabilities:
Parse pe header

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

Function at 0x5315a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x006f7840]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x5315c0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x5315c8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140002be0
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.140004a00
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.140004a00
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 0x140002c50
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000a0a4]
mov rbx, rcx
test esi, esi
jle 0x140002d80
mov rax, qword [0x14000a0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002c9b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002d25
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002c80
mov rcx, rbx
call fcn.1400036a0
mov rdi, rax
test rax, rax
je 0x140002da2
mov rax, qword [0x14000a0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400037e0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002d87
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002d1e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002d30
add dword [0x14000a0a4], 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 [0x14000a0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002d1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002be0
nop dword [rax]
xor esi, esi
jmp 0x140002ca8
mov rax, qword [0x14000a0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002be0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002be0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003310
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000a100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x14000336c
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 eax, eax
jne 0x140003363
test rsi, rsi
je 0x140003363
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003348
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 0x1400036a0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140003720
Capabilities:
Parse pe header

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

Function at 0x1400037e0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006af0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400037ff
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003808
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001585
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov r9d, 4
movsxd r12, edx
mov rdi, rcx
mov rbp, r8
xor ecx, ecx
mov r8d, 0x3000
mov rdx, r12
mov rsi, r12
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
xor eax, eax
cmp esi, eax
jle 0x1400015d0
mov rdx, rax
and edx, 3
mov dl, byte [rbp + rdx]
xor dl, byte [rdi + rax]
mov byte [rbx + rax], dl
inc rax
jmp 0x1400015b7
mov rcx, rbx
lea r9, [rsp + 0x3c]
mov r8d, 0x20
call fcn.140001553
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r9, rbx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], 0
lea r8, [0x140001550]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140001620
Capabilities:
Connect pipe
Create pipe
Write file on windows
Write pipe

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x4c], 0
mov rsi, rcx
mov ebx, edx
lea rcx, [0x140049040]
mov qword [rsp + 0x38], 0
mov edx, 2
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov r12, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400016cc
xor edx, edx
mov rcx, r12
lea rdi, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x1400016cc
test ebx, ebx
jle 0x1400016b6
mov r9, rdi
mov r8d, ebx
mov rdx, rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400016c1
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400016cc
mov edx, dword [rsp + 0x4c]
add rsi, rdx
sub ebx, edx
jmp 0x140001693
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
ret

Function at 0x1400016f4
Capabilities:
Read file on windows

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
xor r9d, r9d
mov r8d, 3
mov dword [rsp + 0x4c], 0
mov rsi, rcx
mov ebx, edx
lea rcx, [0x140049040]
mov qword [rsp + 0x30], 0
mov edx, 0x80000000
lea rdi, [rsp + 0x4c]
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
xor eax, eax
cmp r12, 0xffffffffffffffff
je 0x14000178c
test ebx, ebx
jle 0x140001771
mov r9, rdi
mov r8d, ebx
mov rdx, rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140001781
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x14000178c
mov edx, dword [rsp + 0x4c]
add rsi, rdx
sub ebx, edx
jmp 0x14000174e
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
ret
Function at 0x140001893
Capabilities:
Create thread

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140046480]
movsxd rcx, dword [rbx + 4]
call sub.msvcrt.dll_malloc
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
mov r12, rax
mov ecx, 0x400
call rsi
mov edx, dword [rbx + 4]
mov rcx, r12
call fcn.1400016f4
test eax, eax
je 0x1400017b8
mov edx, dword [rbx + 4]
lea r8, [rbx + 8]
mov rcx, r12
call fcn.140001585
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
sub rsp, 0x38
lea rcx, [0x140049040]
call fcn.1400017e8
xor ecx, ecx
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], 0
lea r8, [0x1400016d6]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor ecx, ecx
add rsp, 0x38
jmp 0x140001796

Function at 0x140001bb0
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.140002a90
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.140002a90
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 0x140001c20
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400490f4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140001dd0
mov rax, qword [0x1400490f8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140001c6c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001cf7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140001c50
mov rcx, r12
call fcn.1400026d0
mov rbp, rax
test rax, rax
je 0x140001e2d
mov rax, qword [0x1400490f8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.140002800
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400490f8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001e12
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001cf0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001d80
add dword [0x1400490f4], 1
cmp ebx, 8
jae 0x140001d28
test bl, 4
jne 0x140001de0
test ebx, ebx
je 0x140001d19
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140001e00
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 0x140001d19
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 0x140001d5a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
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 rdi, qword [0x1400490f8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001cf0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001bb0
xor edi, edi
jmp 0x140001c77
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140001d19
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140001d19
mov rax, qword [0x1400490f8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.140001bb0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140001bb0
nop
nop dword [rax]
Function at 0x140002340
Capabilities:
Get thread local storage value

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

Function at 0x1400026d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x140046360]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x140002749
mov rcx, r10
call fcn.1400025a0
test eax, eax
je 0x140002749
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 0x140002746
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 0x14000273d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x140002749
add r8, 0x28
cmp r8, r9
jne 0x140002728
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret