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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x18000c070]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.18000318c
xor ebx, ebx
cmp qword [0x180ebf328], rbx
mov rdi, rax
jne 0x180006c07
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x180006cde
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180006cde
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x180ebf328], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x180ebf330], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x180ebf338], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x180ebf348], rax
test rax, rax
je 0x180006bfe
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x180ebf340], rax
jmp 0x180006c0e
mov rax, qword [0x180ebf340]
jmp 0x180006c15
mov rax, qword [0x180ebf340]
mov r11, qword [0x180ebf348]
cmp rax, rdi
je 0x180006c7c
cmp r11, rdi
je 0x180006c7c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x180ebf348]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x180006c7c
test rax, rax
je 0x180006c7c
call rsi
test rax, rax
je 0x180006c76
lea rcx, [rsp + 0x30]
mov r9d, 0xc
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x180006c76
test byte [rsp + 0x40], 1
jne 0x180006c7c
bts ebp, 0x15
jmp 0x180006cbc
mov rcx, qword [0x180ebf330]
cmp rcx, rdi
je 0x180006cbc
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180006cbc
call rax
mov rbx, rax
test rax, rax
je 0x180006cbc
mov rcx, qword [0x180ebf338]
cmp rcx, rdi
je 0x180006cbc
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180006cbc
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x180ebf328]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180006cde
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x180006ce0
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180001860
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140003c08
Capabilities:
Enumerate gui resources

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
test ecx, ecx
je 0x140003c7f
movsxd rdx, ecx
lea rcx, [0x140003b64]
call qword [sym.imp.USER32.DLL_EnumWindows]
mov rbx, qword [0x1400120e0]
test rbx, rbx
je 0x140003cf2
mov rdi, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rbx + 0x10], eax
jne 0x140003c75
cmp byte [rbx + 0x20], 0
je 0x140003c75
mov rcx, qword [rbx + 0x18]
xor r9d, r9d
mov dword [rsp + 0x30], 3
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea rdx, [r9 - 2]
xor r8d, r8d
call qword [sym.imp.USER32.DLL_SetWindowPos]
mov rbx, rdi
test rdi, rdi
jne 0x140003c3b
jmp 0x140003cf2
mov rbx, qword [0x1400120e0]
test rbx, rbx
je 0x140003cf2
mov rdi, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rbx + 0x10], eax
jne 0x140003cea
cmp byte [rbx + 0x21], 0
je 0x140003cae
mov rcx, qword [rbx + 0x18]
mov edx, 1
call qword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [rbx + 0x20], 0
je 0x140003cda
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x30], 3
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
or rdx, 0xffffffffffffffff
call qword [sym.imp.USER32.DLL_SetWindowPos]
lea rdx, [rbx + 0x10]
lea rcx, [0x1400120e0]
call fcn.140006c20
mov rbx, rdi
test rdi, rdi
jne 0x140003c8b
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x140003ea4
Capabilities:
Set environment variable

Disassembly:
sub rsp, 0x28
mov rax, rdx
test rcx, rcx
je 0x140003ec4
test rax, rax
lea rdx, [0x14000d91a]
cmovne rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
add rsp, 0x28
ret
Function at 0x140004574
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rcx, qword [0x140012290]
call fcn.140006adc
xor ebx, ebx
or esi, 0xffffffff
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dl, byte [rax]
test dl, dl
je 0x14000463a
mov rcx, qword [rsp + 0x30]
mov r10b, 0x20
lea r9d, [rbx + 1]
cmp dl, r10b
jne 0x1400045c8
add rax, r9
cmp byte [rax], r10b
je 0x1400045c0
mov dl, byte [rax]
mov r8d, r9d
cmp dl, 0x22
jne 0x1400045fe
add rax, r9
mov rbx, rax
mov cl, byte [rax]
test cl, cl
je 0x1400045f9
cmp cl, 0x22
je 0x1400045ec
add rax, r9
mov cl, byte [rax]
test cl, cl
jne 0x1400045de
cmp byte [rax], 0
je 0x1400045f9
mov rcx, rax
add rax, r9
jmp 0x140004620
mov rcx, rax
jmp 0x140004620
test dl, dl
je 0x14000461d
mov rbx, rax
cmp dl, r10b
je 0x140004613
add rax, r9
mov dl, byte [rax]
test dl, dl
jne 0x140004605
cmp byte [rax], 0
mov rcx, rax
je 0x140004620
jmp 0x1400045f4
xor r8d, r8d
cmp dword [rbp], esi
jne 0x14000462a
test rdi, rdi
jne 0x140004644
test r8d, r8d
je 0x140004632
add esi, r9d
mov dl, byte [rax]
xor ebx, ebx
test dl, dl
jne 0x1400045bb
test rdi, rdi
jne 0x140004656
movsxd rax, esi
jmp 0x140004659
test rbx, rbx
je 0x140004656
sub ecx, ebx
mov rax, rbx
mov dword [rdi], ecx
add dword [rbp], r9d
jmp 0x140004659
and dword [rdi], 0
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x140004734
Capabilities:
Accept command line arguments

Disassembly:
sub rsp, 0x28
mov rcx, qword [0x140012290]
call fcn.140006adc
xor ecx, ecx
add rsp, 0x28
jmp fcn.140004574

Function at 0x1400048c8
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov esi, 0x104
mov ecx, esi
call fcn.1400073a0
mov ecx, esi
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
movsxd rbx, eax
test eax, eax
je 0x140004907
cmp byte [rbx + rdi - 1], 0x5c
je 0x140004907
mov byte [rbx + rdi], 0x5c
inc ebx
sub esi, ebx
mov ecx, esi
call fcn.140007540
mov rsi, qword [rsp + 0x38]
movsxd r11, ebx
mov rbx, qword [rsp + 0x30]
mov byte [r11 + rdi], 0
add rsp, 0x20
pop rdi
ret

Function at 0x140004928
Capabilities:
Set current directory

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x14000493b
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cdqe
jmp 0x14000493d
xor eax, eax
add rsp, 0x28
ret

Function at 0x140004944
Capabilities:
Delete file

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x14000496f
test dl, 2
je 0x140004962
mov edx, pe_nt_image_headers64
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
cdqe
jmp 0x140004971
xor eax, eax
add rsp, 0x20
pop rbx
ret
xor edx, edx
jmp 0x140004944
Function at 0x140004978
Capabilities:
Delete file
Set file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x14000496f
test dl, 2
je 0x140004962
mov edx, pe_nt_image_headers64
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
cdqe
jmp 0x140004971
xor eax, eax
add rsp, 0x20
pop rbx
ret
xor edx, edx
jmp 0x140004944

Function at 0x140004b18
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov ebx, 0x104
mov ecx, ebx
call fcn.1400073a0
mov ecx, ebx
mov rdx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea rcx, str.Kernel32.DLL
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbp, rax
test rax, rax
je 0x140004b8a
lea rdx, str.GetLongPathNameA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140004b81
mov r8d, ebx
mov rdx, rsi
mov rcx, rsi
call rax
mov edi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
sub ebx, edi
mov ecx, ebx
call fcn.140007540
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
movsxd r11, edi
mov byte [r11 + rsi], 0
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140004cf0
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x20
xor ebx, ebx
mov rsi, r8
mov rbp, rdx
cmp qword [0x1400120f8], rbx
mov r13, rcx
jne 0x140004d37
lea r8, [fcn.140004cac]
lea edx, [rbx + 0x10]
mov ecx, 0x150
call fcn.140006a60
mov qword [0x1400120f8], rax
test rbp, rbp
lea rdi, [0x14000d91a]
cmovne rdi, rbp
test rsi, rsi
je 0x140004d4e
cmp byte [rsi], bl
jne 0x140004d55
lea rsi, [0x14000d984]
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov rcx, rsi
mov r12, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [0x140011f38]
lea eax, [rax + r12 + 2]
xor edx, edx
movsxd r8, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140004e2d
mov rdx, rdi
mov rcx, rax
call sub.msvcrt.dll_strcpy
test r12d, r12d
je 0x140004db4
movsxd rax, r12d
cmp byte [rax + rdi - 1], 0x5c
je 0x140004db4
lea rdx, [0x14000d980]
mov rcx, rbp
call sub.msvcrt.dll_strcat
mov rdx, rsi
mov rcx, rbp
call sub.msvcrt.dll_strcat
mov rcx, qword [0x1400120f8]
mov rdx, r13
call fcn.140006954
mov rcx, rbp
lea rdx, [rax + 0xc]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
je 0x140004dec
mov dword [rdi + 8], ebx
jmp 0x140004dfe
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140004e03
mov dword [rdi + 8], 1
mov rbx, rdi
jmp 0x140004e1b
cmp r13, 0xffffffffffffffff
jne 0x140004e18
mov rcx, qword [0x1400120f8]
mov rdx, rdi
call fcn.140006a20
mov qword [rdi], rbx
mov rcx, qword [0x140011f38]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop r13
pop r12
pop rdi
ret
Function at 0x140004ea8
Capabilities:
Create directory

Disassembly:
sub rsp, 0x138
test rcx, rcx
je 0x140004f1b
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.msvcrt.dll_strncpy
lea rcx, [rsp + 0x20]
mov byte [rsp + 0x124], 0
call sub.msvcrt.dll_strlen
lea rcx, [rsp + rax + 0x20]
lea rax, [rsp + 0x20]
cmp rcx, rax
jbe 0x140004f07
lea rdx, [rcx - 1]
mov al, byte [rdx]
cmp al, 0x20
je 0x140004efa
cmp al, 0x5c
je 0x140004efa
cmp al, 0x2f
jne 0x140004f07
lea rax, [rsp + 0x20]
mov rcx, rdx
cmp rdx, rax
ja 0x140004ee8
mov byte [rcx], 0
lea rcx, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cdqe
jmp 0x140004f1d
xor eax, eax
add rsp, 0x138
ret

Function at 0x140004f30
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x140004f76
mov r8d, dword [rcx + 0x10]
mov rdx, qword [rcx + 8]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [rbx + 0x10]
movsxd rax, dword [rsp + 0x40]
mov dword [rbx + 0x14], r11d
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x140005680
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov rdx, rcx
mov rcx, qword [0x1400122e0]
call fcn.1400069f4
mov rbx, rax
test rax, rax
je 0x1400056d4
cmp qword [rax + 8], 0
je 0x1400056b2
cmp dword [rax + 0x1c], 0
jne 0x1400056b2
mov rcx, rax
call fcn.140004f30
mov rcx, qword [rbx]
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r11d, eax
mov eax, dword [rsp + 0x38]
shl rax, 0x20
or rax, r11
add rsp, 0x20
pop rbx
ret
or rax, 0xffffffffffffffff
add rsp, 0x20
pop rbx
ret

Function at 0x1400057d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rdx
mov rdx, rcx
mov rcx, qword [0x1400122e0]
mov rbx, r8
mov dword [rsp + 0x58], 0
call fcn.1400069f4
test rax, rax
je 0x140005838
cmp qword [rax + 8], 0
mov rdx, rdi
je 0x14000581e
mov r8, rbx
mov rcx, rax
call fcn.1400058e0
cdqe
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
mov r8d, ebx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x58]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140005850
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
mov edi, r8d
mov rsi, rdx
mov dword [rsp + 0x48], ebx
test rdx, rdx
je 0x1400058c8
test r8d, r8d
je 0x1400058c8
mov rdx, rcx
mov rcx, qword [0x1400122e0]
call fcn.1400069f4
test rax, rax
je 0x1400058c4
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x1400058b1
mov rcx, rax
call fcn.140005a10
mov ebx, eax
cdqe
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x1400058e0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
xor r12d, r12d
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x1c], r12d
jne 0x140005914
call fcn.140004f30
mov dword [rbx + 0x1c], 1
mov dword [rbx + 0x14], r12d
movsxd rcx, dword [rbx + 0x14]
mov eax, dword [rbx + 0x18]
sub eax, ecx
mov rbp, rcx
cmp rcx, rdi
jl 0x140005979
movsxd rcx, eax
mov rax, rdi
add rcx, qword [rbx + 8]
dec rax
je 0x14000596f
dec rax
je 0x140005961
cmp rax, 2
je 0x140005955
mov rdx, rcx
mov r8, rdi
mov rcx, rsi
call sub.msvcrt.dll_memcpy
movsxd rax, edi
jmp 0x1400059f4
mov eax, dword [rcx]
mov dword [rsi], eax
movsxd rax, edi
jmp 0x1400059f4
movzx eax, word [rcx]
mov word [rsi], ax
movsxd rax, edi
jmp 0x1400059f4
movzx eax, byte [rcx]
mov byte [rsi], al
movsxd rax, edi
jmp 0x1400059f4
movsxd rdx, eax
mov r8, rcx
mov rcx, rsi
add rdx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
movsxd r8, dword [rbx + 0x10]
mov rcx, qword [rbx]
sub rdi, rbp
add rsi, rbp
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
cmp rdi, r8
jl 0x1400059c1
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
mov dword [rbx + 0x14], r12d
add eax, ebp
cdqe
jmp 0x1400059f7
mov rdx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r11, dword [rsp + 0x50]
mov rdx, qword [rbx + 8]
cmp rdi, r11
mov rcx, rsi
mov dword [rbx + 0x14], r11d
cmovg rdi, r11
mov dword [rbx + 0x18], r11d
mov r8, rdi
call sub.msvcrt.dll_memcpy
lea eax, [rbp + rdi]
cdqe
sub dword [rbx + 0x14], edi
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret

Function at 0x140005a10
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x1c], 1
movsxd rdi, r8d
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x50], 0
jne 0x140005a5a
mov edx, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov r9d, 1
neg edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x1c], 0
mov dword [rbx + 0x14], eax
mov ecx, dword [rbx + 0x14]
cmp ecx, edi
jle 0x140005a96
mov eax, dword [rbx + 0x10]
mov edx, edi
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rbx + 8]
dec edx
je 0x140005a8f
dec edx
je 0x140005a87
cmp edx, 2
je 0x140005a81
mov rdx, rsi
jmp 0x140005ae4
mov eax, dword [rsi]
mov dword [rcx], eax
jmp 0x140005aec
movzx eax, word [rsi]
mov word [rcx], ax
jmp 0x140005aec
movzx eax, byte [rsi]
mov byte [rcx], al
jmp 0x140005aec
mov rcx, rbx
call fcn.140004f30
mov r11d, dword [rbx + 0x10]
mov rdx, rsi
cmp edi, r11d
jl 0x140005ad9
mov rcx, qword [rbx]
lea r9, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
sub r11d, dword [rbx + 0x14]
movsxd rcx, r11d
add rcx, qword [rbx + 8]
mov r8, rdi
call sub.msvcrt.dll_memcpy
sub dword [rbx + 0x14], edi
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x30
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400bac30]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400bac40]
mov dword [rax], 1
mov rax, qword [0x1400bac50]
mov dword [rax], 1
mov rax, qword [0x1400babb0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400bac20]
mov dword [0x1400c300c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400bad10]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400bacf0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400ba9a0]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x140014ea0
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 dbg.__acrt_iob_func
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 dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140014f10
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400c30b4]
mov rbx, rcx
test esi, esi
jle 0x140015040
mov rax, qword [0x1400c30b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140014f5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140014fe5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140014f40
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140015062
mov rax, qword [0x1400c30b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400c30b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140015047
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140014fde
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140014ff0
add dword [0x1400c30b4], 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 [0x1400c30b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140014fde
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140014f68
mov rax, qword [0x1400c30b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400155f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400c3120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400c3100]
test rbx, rbx
je 0x14001564c
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 0x140015643
test eax, eax
jne 0x140015643
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015628
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 0x140015860
Capabilities:
Parse pe header

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

Function at 0x140015890
Capabilities:
Enumerate pe sections

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

Function at 0x1400158e0
Capabilities:
Parse pe header

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

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

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

Function at 0x140015a00
Capabilities:
Parse pe header

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