joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180054150
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, ecx
mov ecx, dword [0x18007fa4c]
mov ebx, edi
test ecx, ecx
je 0x18005428b
mov rax, qword [0x18007fa40]
add rax, 0x20
nop
movzx edx, byte [rax]
shr edx, 1
and edx, 1
cmp edx, esi
jne 0x1800541a8
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x180054180
mov eax, edi
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
cmp ebx, 0xffffffff
je 0x18005428b
mov r8d, edi
lea rcx, [rsp + 0x20]
test esi, esi
mov edx, 0xffffffff
setne r8b
call fcn.180053e70
mov r8d, dword [0x18007fa4c]
cmp ebx, r8d
jae 0x180054218
nop word [rax + rax]
mov eax, ebx
imul rcx, rax, 0x38
mov rax, qword [0x18007fa40]
movzx edx, byte [rcx + rax + 0x20]
shr edx, 1
and edx, 1
cmp edx, esi
je 0x180054211
mov edx, esi
mov ecx, ebx
call fcn.180054020
mov edi, eax
test eax, eax
jne 0x180054218
mov r8d, dword [0x18007fa4c]
inc ebx
cmp ebx, r8d
jb 0x1800541e0
cmp qword [rsp + 0x20], 0
je 0x18005428b
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x180054277
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x40], rbp
mov ebp, eax
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x180054268
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rbp, 1
jne 0x180054240
mov rbp, qword [rsp + 0x40]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x18007c2d8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x48]
mov eax, edi
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x1800545a0
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r15
sub rsp, 0x30
xor r15d, r15d
mov esi, edx
mov ebx, r15d
xor eax, eax
mov rdi, rcx
mov ebp, 1
lock cmpxchg dword [0x18007c2cc], ebp
je 0x1800545f7
cmp rbx, 0x20
jae 0x1800545e0
xor ecx, ecx
jmp 0x1800545e2
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x18007c2cc], ebp
jne 0x1800545d6
cmp qword [0x18007c2d8], r15
je 0x1800546f1
test rdi, rdi
jne 0x180054617
mov ecx, esi
call fcn.180054150
mov ebp, eax
jmp 0x1800546f6
mov ecx, dword [0x18007fa4c]
mov ebx, r15d
test ecx, ecx
je 0x18005463f
mov r8, qword [0x18007fa40]
mov rax, r8
nop
cmp rdi, qword [rax]
je 0x180054649
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x180054630
mov ebp, 4
jmp 0x1800546f6
cmp ebx, 0xffffffff
je 0x18005463f
mov eax, ebx
imul rdx, rax, 0x38
movzx eax, byte [rdx + r8 + 0x20]
shr eax, 1
and eax, ebp
cmp eax, esi
je 0x1800546e8
mov r8d, ebp
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.180053e70
mov edx, esi
mov ecx, ebx
call fcn.180054020
mov ebp, eax
cmp qword [rsp + 0x20], r15
je 0x1800546f6
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x1800546d2
mov rbx, qword [rsp + 0x20]
mov esi, eax
nop word [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x1800546c8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rsi, 1
jne 0x1800546a0
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x18007c2d8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1800546f6
neg esi
sbb ebp, ebp
add ebp, 6
jmp 0x1800546f6
mov ebp, 2
xchg dword [0x18007c2cc], r15d
mov rbx, qword [rsp + 0x40]
mov eax, ebp
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r15
ret
Function at 0x180059fb0
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
cmp edx, 1
jne 0x180059fe3
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
xor eax, eax
lea r8, [0x1800598e0]
mov qword [rsp + 0x28], rax
mov r9, rbx
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
add rsp, 0x30
pop rbx
ret
Function at 0x1400012a0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
nop dword [rax + rax]
mov ecx, 0x20
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x1400012b0
cmp byte [0x14000566c], bl
jne 0x140001315
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], 0xa
call fcn.140001370
mov rdx, qword [0x140005680]
lea r8, [rsp + 0x40]
mov rcx, qword [0x140005678]
add rdx, 0x17bc530
mov r9d, 4
mov dword [rsp + 0x40], 0x10001
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov byte [0x14000566c], 1
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], 0xa
call fcn.140001370
mov rdx, qword [0x140005680]
lea r8, [rsp + 0x40]
mov rcx, qword [0x140005678]
add rdx, 0x17bc530
mov r9d, 4
mov dword [rsp + 0x40], 0x100
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov byte [0x14000566c], bl
jmp 0x1400012b0

Function at 0x140001db8
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001e02
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001e02
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001e02
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001e02
cmp dword [rcx + 0x84], 0xe
jbe 0x140001e02
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001e04
xor al, al
add rsp, 0x28
ret
Function at 0x403260
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004c4624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4033e8
mov rax, qword [0x004c4628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4032ac
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x403335
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x403290
mov rcx, rbx
call fcn.00403f00
test rax, rax
mov r12, rax
je 0x40341d
mov rax, qword [0x004c4628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00404030
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004c4628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x403400
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40332e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x403390
add dword [0x004c4624], 1
cmp edi, 8
jae 0x403363
test dil, 4
jne 0x4033d4
test edi, edi
je 0x403358
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4033ef
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 0x403358
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 0x40337c
jmp 0x403358
add rsi, qword [0x004c4628]
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 0x40332e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00404400
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x403358
xor esi, esi
jmp 0x4032b7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x403358
mov rax, qword [0x004c4628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00404400
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00404400
nop
nop dword [rax]

Function at 0x403b70
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004c4900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004c48e0]
test rbx, rbx
je 0x403bc4
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 0x403bbb
test rsi, rsi
je 0x403bbb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x403ba0
lea rcx, [0x004c4900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x403f00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004c1c80]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x403f6d
mov rcx, r8
call fcn.00403de0
test eax, eax
je 0x403f6d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x403f6d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x403f64
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403f6f
add rax, 0x28
cmp rax, r9
jne 0x403f50
xor eax, eax
add rsp, 0x28
ret

Function at 0x404400
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
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 fcn.004042c0
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.004042c0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140001450
Capabilities:
Create thread
Get hostname
Inject thread

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x158
mov esi, r9d
mov rdi, r8
mov r14, rdx
mov r12, rcx
mov ecx, dword [rsp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x20], 4
xor r15d, r15d
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8, r14
mov r9d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x14000169a
mov rbx, rax
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
mov rdx, rbx
mov r8, r12
mov r9, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001697
mov dword [rsp + 0x40], 0x100
xorps xmm0, xmm0
movaps xmmword [rsp + 0x140], xmm0
movaps xmmword [rsp + 0x130], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
lea rdx, [rsp + 0x50]
lea r8, [rsp + 0x40]
mov ecx, 3
call qword [sym.imp.KERNEL32.dll_GetComputerNameExA]
test r14, r14
je 0x140001617
cmp r14, 1
jne 0x1400015a3
xor ecx, ecx
test r14b, 1
je 0x140001617
mov r8d, dword [rsp + 0x40]
mov rax, rcx
shr rax, 0x20
je 0x140001608
mov rax, rcx
xor edx, edx
div r8
jmp 0x14000160f
mov r8, r14
and r8, 0xfffffffffffffffe
xor ecx, ecx
jmp 0x1400015c7
xor edx, edx
div r9
movzx eax, byte [rsp + rdx + 0x50]
xor byte [rbx + rcx + 1], al
add rcx, 2
cmp r8, rcx
je 0x140001581
mov r9d, dword [rsp + 0x40]
mov rax, rcx
shr rax, 0x20
je 0x1400015e0
mov rax, rcx
xor edx, edx
div r9
jmp 0x1400015e7
mov eax, ecx
xor edx, edx
div r9d
movzx eax, byte [rsp + rdx + 0x50]
xor byte [rbx + rcx], al
lea rax, [rcx + 1]
mov r9d, dword [rsp + 0x40]
mov rdx, rax
shr rdx, 0x20
jne 0x1400015b0
xor edx, edx
div r9d
jmp 0x1400015b5
mov eax, ecx
xor edx, edx
div r8d
movzx eax, byte [rsp + rdx + 0x50]
xor byte [rbx + rcx], al
mov dword [rsp + 0x44], 0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
mov rdx, rbx
mov r8, r14
mov r9d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001697
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
lea r9, [0x140001440]
xor r15d, r15d
mov rcx, 0xffffffffffffffff
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rdi], rax
test rax, rax
je 0x14000169a
test esi, esi
je 0x140001692
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r15, rbx
jmp 0x14000169a
xor r15d, r15d
mov rax, r15
add rsp, 0x158
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1400016b0
Capabilities:
Check for outputdebugstring error
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001743
call fcn.14084f750
cmp byte [rax + 2], 0
jne 0x140001743
test byte [rax + 0xbc], 0x70
jne 0x140001743
call fcn.14084fd10
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x140853508]
mov edx, dword [rax]
mov rax, qword [0x140853510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x140853500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.140850700
nop
add rsp, 0x20
pop rbp
jmp 0x1400016b0

Function at 0x140001750
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001743
call fcn.14084f750
cmp byte [rax + 2], 0
jne 0x140001743
test byte [rax + 0xbc], 0x70
jne 0x140001743
call fcn.14084fd10
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x140853508]
mov edx, dword [rax]
mov rax, qword [0x140853510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x140853500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.140850700
nop
add rsp, 0x20
pop rbp
jmp 0x1400016b0

Function at 0x14084f760
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
ret
Function at 0x140850260
Capabilities:
Allocate or change rwx memory

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
movsxd r13, dword [rcx + 0x3c]
mov ebx, dword [rcx + r13 + 0x54]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1408502ca
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1408502ca
mov rcx, rsi
mov rdx, rdi
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [rdi + r13 + 6]
test ax, ax
je 0x14085036d
movsxd rcx, dword [rdi + 0x3c]
lea rbp, [rcx + rdi]
add rbp, 0x110
xor ebx, ebx
jmp 0x140850305
movzx eax, word [rdi + r13 + 6]
inc rbx
movzx ecx, ax
add rbp, 0x28
cmp rbx, rcx
jae 0x14085036d
cmp dword [rbp + 0x1c], 0
js 0x1408502f6
mov r14d, dword [rbp]
mov r15d, dword [rbp + 4]
lea r12, [rdi + r15]
add r15, rsi
mov rcx, r12
mov rdx, r15
mov r8, r14
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1408502f0
mov rcx, r15
mov rdx, r14
mov r8d, 0x40
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1408502f0
mov rcx, r15
mov rdx, r12
mov r8, r14
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x24]
mov rcx, r15
mov rdx, r14
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1408502f0
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1408503f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
test rcx, rcx
je 0x1408505c4
mov r14, rdx
mov rbx, rcx
movsxd rcx, dword [rcx + 0x3c]
mov r15d, dword [rcx + rbx + 0x88]
mov r13d, dword [r15 + rbx + 0x1c]
add r13, rbx
mov rax, rdx
shr rax, 0x10
test ax, ax
je 0x140850484
mov ebp, dword [rbx + r15 + 0x18]
test ebp, ebp
je 0x1408505c4
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r8
mov r12d, dword [rbx + r15 + 0x20]
mov esi, dword [rbx + r15 + 0x24]
add r12, rbx
add rsi, rbx
xor edi, edi
nop dword [rax + rax]
mov ecx, dword [r12]
add rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14085049a
add r12, 4
add rsi, 2
dec ebp
jne 0x140850460
jmp 0x1408505cb
movzx eax, r14w
mov ecx, dword [rbx + r15 + 0x10]
sub rax, rcx
mov edi, dword [r13 + rax*4]
jmp 0x1408505c8
movzx eax, word [rsi]
mov edi, dword [r13 + rax*4]
cmp r15d, edi
ja 0x1408505c8
mov rax, qword [rsp + 0x38]
add r15d, dword [rbx + rax + 0x8c]
cmp edi, r15d
jae 0x1408505c8
add rdi, rbx
mov rcx, rdi
mov edx, 0x2e
call sub.msvcrt.dll_strchr
mov rbx, rax
inc rbx
mov rsi, rbx
sub rsi, rdi
lea rcx, [rsi + 4]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1408505c4
mov r14, rax
lea r8, [rsi + 1]
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov rdx, rax
mov r9, rdi
call qword [sym.imp.msvcrt.dll_mbstowcs_s]
mov dword [r14 + rsi*2], 0x6c0064
mov word [r14 + rsi*2 + 4], 0x6c
lea rdx, [0x140853002]
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140850552
lea rdx, str.ext_
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x1408505a0
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rdx, r14
call fcn.14084f780
test rax, rax
je 0x1408505a0
mov rsi, rax
mov rcx, r14
call sub.msvcrt.dll_free
mov rdi, qword [rsp + 0x40]
lea rcx, [rdi + 1]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1408505c4
mov r14, rax
add rdi, rdi
mov rcx, rax
mov rdx, rsi
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov rdx, rbx
mov r8, r14
call fcn.1408503f0
mov rdi, rax
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x1408505cb
xor edi, edi
jmp 0x1408505cb
add rdi, rbx
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140850910
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.140851780
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.140851780
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 0x140850980
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1408560a4]
mov rbx, rcx
test esi, esi
jle 0x140850ab0
mov rax, qword [0x1408560a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1408509cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140850a55
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1408509b0
mov rcx, rbx
call fcn.1408513f0
mov rdi, rax
test rax, rax
je 0x140850ad2
mov rax, qword [0x1408560a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140851530
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1408560a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140850ab7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140850a4e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140850a60
add dword [0x1408560a4], 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 [0x1408560a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140850a4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140850910
nop dword [rax]
xor esi, esi
jmp 0x1408509d8
mov rax, qword [0x1408560a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140850910
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140850910
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140851060
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140856100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1408560e0]
test rbx, rbx
je 0x1408510bc
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 0x1408510b3
test eax, eax
jne 0x1408510b3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140851098
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 0x1408513f0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140851470
Capabilities:
Parse pe header

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

Function at 0x140851530
Capabilities:
Parse pe header

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