joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006025c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140058c40
sub rsp, rax
mov rax, qword [0x1400ca100]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14006e374
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400602ab
mov rax, rbp
jmp 0x1400603b3
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xcca60]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14006f3c4
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xcca60]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400603af
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400603af
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14006f3c4
test rax, rax
js 0x1400603af
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400603af
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400603a1
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400603a1
cmp byte [rcx], 0xd
jne 0x140060387
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140060396
cmp byte [rcx + 1], 0xa
jne 0x140060396
inc rcx
jmp 0x140060396
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0xca540]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140060369
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400603b3
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400580f0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x140068d2c
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, edx
mov rbp, rcx
test r8, r8
jne 0x140068d63
call fcn.14006a098
mov dword [rax], 0x16
call fcn.14005e394
xor eax, eax
jmp 0x140068df1
mov rdx, r9
mov rcx, r8
call fcn.140068cc8
mov rbx, rax
test rax, rax
je 0x140068dee
lea rax, [rsp + 0x50]
mov rdx, rsi
mov qword [rsp + 0x28], rax
lea r8, [0x140068bf4]
mov eax, dword [rsp + 0x60]
mov r9, rbx
mov rcx, rbp
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
test rax, rax
jne 0x140068ddb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14006a00c
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140068dc2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140068dd1
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call fcn.14006f0dc
jmp 0x140068dee
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140068deb
mov eax, dword [rsp + 0x50]
mov dword [rcx], eax
mov rdi, rdx
mov rax, rdi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140068f18
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140068f87
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140068f87
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140068f87
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140068f87
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140068f87
cmp dword [rcx + 0x84], 0xe
jbe 0x140068f87
cmp dword [rcx + 0xf8], 0
je 0x140068f87
mov ecx, ebx
call fcn.140069038
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140068e14
nop
cmp dword [rbp + 0x20], 0
je 0x140068fd5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140068fe0
int3
xor r8d, r8d
xor edx, edx
jmp 0x140068f18

Function at 0x14006911c
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140068f87
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140068f87
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140068f87
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140068f87
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140068f87
cmp dword [rcx + 0x84], 0xe
jbe 0x140068f87
cmp dword [rcx + 0xf8], 0
je 0x140068f87
mov ecx, ebx
call fcn.140069038
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140068e14
nop
cmp dword [rbp + 0x20], 0
je 0x140068fd5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140068fe0
int3
xor r8d, r8d
xor edx, edx
jmp 0x140068f18
Function at 0x14006f7dc
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14006f7f2
mov al, 1
jmp 0x14006f852
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14006f803
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14006f850
mov ecx, dword [rcx + 0x18]
nop
call fcn.140076b08
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14006f850
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14006f850
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14006f850
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14006f852
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14006fa78
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400cca60]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14006facf
cmp word [rdx], r13w
jne 0x14006facf
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14006fad4
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14006fbf9
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14006fc1a
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14006fb0d
mov rdx, r9
mov word [rbx], cx
jmp 0x14006fb34
cmp r9, r8
jae 0x14006fb44
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14006faee
jmp 0x14006fbf9
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006fbee
cmp dword [rsp + 0x80], esi
je 0x14006fbee
lea r8, [0x1400cca60]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14006fbc6
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14006fb96
mov word [rbx], r13w
jmp 0x14006fbf6
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14006fba3
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14006fbf6
cmp word [rsp + 0x70], r13w
jne 0x14006fbd3
cmp rbx, r14
je 0x14006fb90
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14006f3cc
cmp word [rsp + 0x70], r13w
je 0x14006fbf9
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400cca60]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14006fbf3
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14006fbf9
Function at 0x14007623c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14007626c
xor eax, eax
jmp 0x14007632f
mov rbp, rbx
cmp word [rax], si
je 0x140076291
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140076278
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140076274
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.140074988
movsxd r14, eax
test eax, eax
jne 0x1400762cf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140076265
mov rcx, r14
call fcn.140071de0
mov rdi, rax
test rax, rax
jne 0x1400762e8
xor ecx, ecx
call fcn.14006f0dc
jmp 0x1400762c4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140074988
test eax, eax
jne 0x140076319
mov rcx, rdi
call fcn.14006f0dc
jmp 0x140076323
xor ecx, ecx
call fcn.14006f0dc
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x14007905c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14006def4
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1400790fd
cmp ebx, dword [rsp + 0x30]
je 0x1400790f6
test esi, esi
je 0x1400790f6
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400790d1
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400790de
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400790bb
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400790e2
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400790ff
mov eax, 1
jmp 0x1400790ff
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14007ca94
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14006f3cc
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14006f3cc
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14007cbe4
cmp rax, 0xffffffffffffffff
je 0x14007cbe4
xor edi, edi
test rbp, rbp
jle 0x14007cb8f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14006f064
mov rbx, rax
test rax, rax
jne 0x14007cb1c
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14007cb85
mov edx, 0x8000
mov ecx, r14d
call fcn.14006b61c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14006ed5c
cmp eax, 0xffffffff
je 0x14007cb65
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14007cb2c
mov edx, r15d
mov ecx, r14d
call fcn.14006b61c
jmp 0x14007cb85
cmp byte [rsi + 0x38], dil
je 0x14007cb7c
cmp dword [rsi + 0x34], 5
jne 0x14007cb7c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14007cb85
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14006f0dc
jmp 0x14007cbf8
jns 0x14007cbf8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14006f3cc
cmp rax, 0xffffffffffffffff
jne 0x14007cbb0
cmp byte [rsi + 0x30], dil
je 0x14007cbf8
mov edi, dword [rsi + 0x2c]
jmp 0x14007cbf8
mov ecx, r14d
call fcn.140076b08
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14007cbf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x14007cbf8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14007cbf1
mov eax, dword [rsi + 0x2c]
jmp 0x14007cbf6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14006f3cc
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x14007de80
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14007dea8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14007dea8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140004618
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
lea rbx, [0x140001678]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140001660]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [section..data], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140001680]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007008], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140001698]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007010], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016b8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007018], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016dc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007020], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016e4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007028], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016ec]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007030], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016f4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov qword [0x140007038], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x1400016fc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140007040], rax
add rsp, 0x20
pop rbx
ret

Function at 0x140004788
Capabilities:
Check os version

Disassembly:
sub rsp, 0x148
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x24], 6
setb al
add rsp, 0x148
ret
Function at 0x1400048b8
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x80
mov rdi, rcx
call fcn.140004788
test al, al
jne 0x1400048e0
mov eax, 2
jmp 0x1400049cd
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
xor ebx, ebx
lea rdx, [rsp + 0x20]
lea r8d, [rbx + 0x30]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140004977
mov esi, 0x1000
mov ecx, dword [rsp + 0x78]
mov rax, qword [rsp + 0x20]
xor edx, edx
div rcx
test rdx, rdx
jne 0x14000494c
cmp qword [rsp + 0x38], rsi
jne 0x14000494c
cmp dword [rsp + 0x40], esi
jne 0x14000494c
cmp dword [rsp + 0x48], 0x20000
jne 0x14000494c
cmp dword [rsp + 0x44], 4
jne 0x14000494c
movabs rax, 0x74636a6e696d7678
cmp qword [rbx], rax
je 0x1400049e2
add rbx, qword [rsp + 0x38]
cmp rbx, 0x7fff0000
jae 0x1400048d6
lea rdx, [rsp + 0x20]
mov r8d, 0x30
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140004908
lea rsi, [0x140007060]
or edi, 0xffffffff
lea rdx, [0x140001348]
mov rcx, rsi
mov r8d, edi
call fcn.140006030
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0xa
mov edx, eax
mov rcx, rsi
call fcn.140005f80
lea rdx, [0x14000124c]
mov r8d, edi
mov rcx, rsi
call fcn.140006030
mov r8d, 0x10
mov edx, ebx
mov rcx, rsi
call fcn.140005f80
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
mov r8d, 0x20
mov rdx, rbx
mov rcx, rdi
call qword [0x140007020]
mov eax, 1
jmp 0x1400049cd
Function at 0x140004a08
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x840
call fcn.140004788
test al, al
je 0x140004a2a
mov eax, 2
jmp 0x140004c39
mov ebx, 0x400
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140004c06
cmp eax, ebx
je 0x140004c06
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
xor r9d, r9d
lea r8d, [r9 + 7]
lea rcx, [rsp + 0x40]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140004a8e
lea rdx, [0x1400011f0]
jmp 0x140004c0d
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
xor r9d, r9d
lea r8d, [r9 + 2]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rsi, rax
test rax, rax
jne 0x140004abf
lea rdx, [0x140001208]
jmp 0x140004c0d
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x20], 0x1000
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbp, rax
test rax, rax
jne 0x140004aef
lea rdx, [0x140001220]
jmp 0x140004c0d
mov rcx, rax
call fcn.140004858
and qword [rsp + 0x868], 0
and dword [rsp + 0x860], 0
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor r9d, r9d
lea rax, [rbx + 0xc]
lea edx, [r9 + 4]
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbp, rax
test rax, rax
jne 0x140004b8e
lea rdx, [0x140001238]
lea rcx, [0x140007060]
or r8d, 0xffffffff
call fcn.140006030
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8d, [rbp + 0xa]
lea rcx, [0x140007060]
mov edx, eax
call fcn.140005f80
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140004c37
lea rdx, [0x14000124c]
lea rcx, [0x140007060]
or r8d, 0xffffffff
call fcn.140006030
jmp 0x140004bc9
add rbx, rax
lea rcx, [rsp + 0x868]
mov r8d, 8
mov rdx, rbx
call qword [0x140007020]
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x860]
mov r8d, 4
call qword [0x140007020]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movabs r11, 0x74636a6e696d7678
cmp qword [rsp + 0x868], r11
jne 0x140004a20
mov eax, 1
test byte [rsp + 0x860], al
jne 0x140004c39
jmp 0x140004a20
lea rdx, [0x1400011d8]
lea rcx, [0x140007060]
or r8d, 0xffffffff
call fcn.140006030
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140007060]
mov edx, eax
mov r8d, 0xa
call fcn.140005f80
xor eax, eax
mov rbx, qword [rsp + 0x870]
add rsp, 0x840
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004da8
Capabilities:
Accept command line arguments

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, 0x22
cmp word [rax], dx
jne 0x140004e0d
lea rcx, [rax + 2]
call qword [0x140007038]
xor ecx, ecx
cmp rax, rcx
je 0x140004dd9
cmp word [rax + 2], cx
je 0x140004dd9
add rax, 4
jmp 0x140004e2f
lea rdx, [0x140001160]
lea rcx, [0x140007060]
or r8d, 0xffffffff
call fcn.140006030
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rcx, [0x140007060]
mov rdx, rax
or r8d, 0xffffffff
call fcn.140006030
xor eax, eax
jmp 0x140004e2f
mov edx, 0x20
mov rcx, rax
call qword [0x140007038]
xor ecx, ecx
cmp rax, rcx
jne 0x140004e2b
lea rdx, [0x140001178]
jmp 0x140004de0
add rax, 2
add rsp, 0x28
ret

Function at 0x140004e68
Capabilities:
Set environment variable

Disassembly:
sub rsp, 0x448
xor eax, eax
mov rdx, rcx
lea rcx, [rsp + 0x20]
lea r8d, [rax + 0x10]
mov dword [rsp + 0x434], eax
mov word [rsp + 0x20], ax
call fcn.140005ef0
lea rdx, [rsp + 0x20]
lea rcx, [0x140001150]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x448
ret

Function at 0x140004f08
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x20
movsxd rax, dword [rcx + 0x3c]
xor r14d, r14d
mov rdi, rcx
mov rbx, r14
cmp dword [rax + rcx + 0x8c], r14d
je 0x140004f98
mov esi, dword [rax + rcx + 0x88]
mov ebp, r14d
add rsi, rcx
mov r13d, dword [rsi + 0x1c]
mov r12d, dword [rsi + 0x20]
add r13, rcx
add r12, rcx
cmp dword [rsi + 0x14], r14d
jbe 0x140004f98
mov ecx, dword [r12]
lea rdx, [0x140001580]
add rcx, rdi
call qword [0x140007030]
cmp eax, r14d
je 0x140004f83
inc ebp
add r12, 4
cmp ebp, dword [rsi + 0x14]
jb 0x140004f5d
jmp 0x140004f98
mov eax, dword [rsi + 0x24]
mov edx, ebp
lea rcx, [rdi + rax]
movzx eax, word [rcx + rdx*2]
mov ebx, dword [r13 + rax*4]
add rbx, rdi
call main
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
sub eax, dword [0x140007054]
mov rdi, qword [rsp + 0x58]
cmp eax, 0x7fff
cmova rbx, r14
mov rax, rbx
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop r14
pop r13
pop r12
ret