joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140023bac
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 0x140023bdc
xor eax, eax
jmp 0x140023c9f
mov rbp, rbx
cmp word [rax], si
je 0x140023c01
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140023be8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140023be4
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.1400210d8
movsxd r14, eax
test eax, eax
jne 0x140023c3f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140023bd5
mov rcx, r14
call fcn.14001e7cc
mov rdi, rax
test rax, rax
jne 0x140023c58
xor ecx, ecx
call fcn.14001bb1c
jmp 0x140023c34
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.1400210d8
test eax, eax
jne 0x140023c89
mov rcx, rdi
call fcn.14001bb1c
jmp 0x140023c93
xor ecx, ecx
call fcn.14001bb1c
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 0x140023cbc
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140023d43
mov rsi, rbx
cmp word [rax], bp
je 0x140023d02
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140023cec
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140023ce8
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001e7cc
mov rdi, rax
test rax, rax
je 0x140023d30
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14002b310
mov rbp, rdi
xor ecx, ecx
call fcn.14001bb1c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140028724
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140015ba8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400287ae
cmp byte [rbp - 0x21], r15b
je 0x1400287a9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400287e4
call fcn.14001fff4
test eax, eax
jne 0x1400287d0
cmp byte [rbp - 0x21], r15b
je 0x1400287c8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400287e4
cmp byte [rbp - 0x21], r15b
je 0x1400287e1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140016194
test eax, eax
jne 0x140028884
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140015ba8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140028823
cmp byte [rbp - 0x21], r15b
je 0x140028858
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140028858
call fcn.14001fff4
test eax, eax
jne 0x140028844
cmp byte [rbp - 0x21], r15b
je 0x14002883d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140028858
cmp byte [rbp - 0x21], r15b
je 0x140028855
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140016194
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140028884
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140028887
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140028895
mov rcx, rdi
call fcn.14001bb1c
cmp byte [rbp + 0x3f], r15b
je 0x1400288a4
mov rcx, qword [rbp + 0x27]
call fcn.14001bb1c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140029e5c
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.14001d454
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001d454
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140029fac
cmp rax, 0xffffffffffffffff
je 0x140029fac
xor edi, edi
test rbp, rbp
jle 0x140029f57
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001fd68
mov rbx, rax
test rax, rax
jne 0x140029ee4
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140029f4d
mov edx, 0x8000
mov ecx, r14d
call fcn.14001ad88
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.14001e130
cmp eax, 0xffffffff
je 0x140029f2d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140029ef4
mov edx, r15d
mov ecx, r14d
call fcn.14001ad88
jmp 0x140029f4d
cmp byte [rsi + 0x38], dil
je 0x140029f44
cmp dword [rsi + 0x34], 5
jne 0x140029f44
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140029f4d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001bb1c
jmp 0x140029fc0
jns 0x140029fc0
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001d454
cmp rax, 0xffffffffffffffff
jne 0x140029f78
cmp byte [rsi + 0x30], dil
je 0x140029fc0
mov edi, dword [rsi + 0x2c]
jmp 0x140029fc0
mov ecx, r14d
call fcn.140019240
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140029fc0
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 0x140029fc0
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140029fb9
mov eax, dword [rsi + 0x2c]
jmp 0x140029fbe
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001d454
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 0x14002b0b0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14002b0d8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14002b0d8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x2fc4d2430
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d3510
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d2e32
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f5108]
test eax, eax
je 0x2fc4d2eca
lea rax, [0x2fc4f50e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f5110]
mov qword [rbp - 8], rax
jmp 0x2fc4d2eae
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4d2ea2
cmp qword [rbp - 0x10], 0
je 0x2fc4d2ea2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4d2e68
lea rax, [0x2fc4f50e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d2ecb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d2fd0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4d2ff8
mov eax, 0
jmp 0x2fc4d3046
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4d3021
mov eax, 0
jmp 0x2fc4d3046
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4d3041
mov eax, 0
jmp 0x2fc4d3046
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d304c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4d30ca
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d30c1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4d30c1
mov rax, qword [rbp - 8]
jmp 0x2fc4d30df
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4d3094
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001f50
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0x198
mov rax, qword [0x1400710c0]
mov qword [rsp + 0x150], rax
mov rax, qword [0x140074658]
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
test rax, rax
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov rdi, r9
mov esi, r8d
mov r12, rdx
mov rbp, rcx
mov r13d, 1
jne 0x140002066
cmp dword [0x140074650], eax
jne 0x140002066
lea rax, [rsp + 0x38]
mov qword [r11 - 8], rbx
lea rdx, str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000000
mov qword [rsp + 0x20], rax
xor ebx, ebx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140002039
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea rdx, [0x14005ab1c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x30], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x38]
test eax, eax
cmove ebx, r13d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x140002039
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x140074658], rax
jmp 0x140002040
mov rax, qword [0x140074658]
test rax, rax
mov rbx, qword [rsp + 0x190]
jne 0x140002066
lea rcx, str.hhctrl.ocx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov qword [0x140074658], rax
je 0x14000208e
mov r10, qword [0x140074648]
test r10, r10
jne 0x140002099
lea edx, [r10 + 0xf]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
mov r10, rax
mov qword [0x140074648], rax
jne 0x140002099
mov dword [0x140074650], r13d
xor eax, eax
jmp 0x1400020a8
mov r9, rdi
mov r8d, esi
mov rdx, r12
mov rcx, rbp
call r10
mov r13, qword [rsp + 0x168]
mov r12, qword [rsp + 0x170]
mov rdi, qword [rsp + 0x178]
mov rsi, qword [rsp + 0x180]
mov rbp, qword [rsp + 0x188]
mov rcx, qword [rsp + 0x150]
call fcn.140002580
add rsp, 0x198
ret
Function at 0x1400047f7
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x1400710c0]
jne 0x14000259a
rol rcx, 0x10
test cx, 0xffff
jne 0x140002596
repz ret
ror rcx, 0x10
jmp 0x140004750
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140074740]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140074838]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1400047d5
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x140074740]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x1400047f7
mov rax, qword [rsp + 0x88]
mov qword [0x140074838], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x1400747d8], rax
mov rax, qword [0x140074838]
mov qword [0x1400746b0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x1400747c0], rax
mov dword [0x1400746a0], 0xc0000409
mov dword [0x1400746a4], 1
mov rax, qword [0x1400710c0]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1400710c8]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140074738], eax
mov ecx, 1
call fcn.140009d20
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x14005adb8]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140074738], 0
jne 0x14000487e
mov ecx, 1
call fcn.140009d20
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret

Function at 0x140004950
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x5b0
mov rbp, rcx
mov rcx, qword [0x140074c10]
mov ebx, r9d
mov rdi, r8
mov rsi, rdx
call fcn.140005b60
test rax, rax
je 0x1400049a4
mov r10, qword [rsp + 0x5e0]
mov r9d, ebx
mov r8, rdi
mov rdx, rsi
mov rcx, rbp
mov qword [rsp + 0x20], r10
call rax
jmp 0x140004a39
mov ecx, 2
call fcn.140009d20
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x98
call fcn.140002ae0
mov rax, qword [rsp + 0x5b8]
mov dword [rsp + 0x40], 0xc000000d
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x140004a25
test ebx, ebx
jne 0x140004a25
lea ecx, [rax + 2]
call fcn.140009d20
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc000000d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea r11, [rsp + 0x5b0]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140006c90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
sub rsp, 0x30
lea r12, [0x140071920]
xor esi, esi
mov edi, ecx
mov rax, r12
mov ebx, esi
nop
cmp ecx, dword [rax]
je 0x140006cce
add ebx, 1
add rax, 0x10
cmp ebx, 0x17
jb 0x140006cb0
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
cmp ebx, 0x17
jae 0x140006eb5
mov ecx, 3
call fcn.14000bfb0
cmp eax, 1
je 0x140006e6c
mov ecx, 3
call fcn.14000bfb0
test eax, eax
jne 0x140006d05
cmp dword [0x1400710b8], 1
je 0x140006e6c
cmp edi, 0xfc
je 0x140006eb5
mov qword [rsp + 0x50], rbp
lea rbp, [0x140074cd0]
lea r8, str.Runtime_Error__n_nProgram:
mov rcx, rbp
mov edx, 0x314
call fcn.1400064d0
test eax, eax
je 0x140006d49
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400048b0
lea rdx, [0x140074ce9]
mov r8d, 0x104
xor ecx, ecx
mov byte [0x140074ded], sil
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x140006d99
lea r8, str._program_name_unknown_
lea rcx, [0x140074ce9]
mov edx, 0x2fb
call fcn.1400064d0
test eax, eax
je 0x140006d99
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400048b0
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [0x140074ce9]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 0x3c
jbe 0x140006de8
lea rcx, [rcx + rbp - 0x23]
lea rdx, [0x140074fe4]
lea r9d, [rax + 3]
lea r8, [0x14005b464]
sub rdx, rcx
call fcn.14000b050
test eax, eax
je 0x140006de8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400048b0
lea r8, [0x14005b460]
mov edx, 0x314
mov rcx, rbp
call fcn.14000af90
test eax, eax
je 0x140006e14
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400048b0
movsxd r8, ebx
mov edx, 0x314
mov rcx, rbp
add r8, r8
mov r8, qword [r12 + r8*8 + 8]
call fcn.14000af90
test eax, eax
je 0x140006e44
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400048b0
lea rdx, str.Microsoft_Visual_C_Runtime_Library
mov r8d, 0x12010
mov rcx, rbp
call fcn.14000bd50
mov rbp, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
mov r11, rax
je 0x140006eb5
cmp rax, 0xffffffffffffffff
je 0x140006eb5
xor eax, eax
movsxd rcx, ebx
lea r9, [rsp + 0x58]
add rcx, rcx
mov qword [rsp + 0x20], rsi
mov rdx, qword [r12 + rcx*8 + 8]
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
Function at 0x140006ed0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov ecx, 3
call fcn.14000bfb0
cmp eax, 1
je 0x140006f02
mov ecx, 3
call fcn.14000bfb0
test eax, eax
jne 0x140006fb6
cmp dword [0x1400710b8], 1
jne 0x140006fb6
mov qword [rsp + 0x48], rbx
lea rbx, [0x140071920]
mov qword [rsp + 0x30], rdi
mov rax, rbx
xor edi, edi
cmp dword [rax], 0xfc
je 0x140006f2e
add edi, 1
add rax, 0x10
cmp edi, 0x17
jb 0x140006f18
jmp 0x140006fa2
cmp edi, 0x17
jae 0x140006fa2
mov ecx, 3
call fcn.14000bfb0
cmp eax, 1
je 0x140006f59
mov ecx, 3
call fcn.14000bfb0
test eax, eax
jne 0x140006fa2
cmp dword [0x1400710b8], 1
jne 0x140006fa2
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
mov r11, rax
je 0x140006fa2
cmp rax, 0xffffffffffffffff
je 0x140006fa2
movsxd rcx, edi
xor eax, eax
lea r9, [rsp + 0x40]
add rcx, rcx
mov qword [rsp + 0x20], rax
mov rdx, qword [rbx + rcx*8 + 8]
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0xff
call fcn.140006c90
mov rdi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x48]
add rsp, 0x38
ret
Function at 0x140007b10
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
mov eax, dword [0x14007521c]
xor r12d, r12d
test eax, eax
mov ebp, r12d
jne 0x140007b6c
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x140007b4c
mov dword [0x14007521c], 1
jmp 0x140007b7f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x140007b66
mov dword [0x14007521c], 2
jmp 0x140007be9
mov eax, dword [0x14007521c]
cmp eax, 1
jne 0x140007be0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x140007bba
cmp word [rdi], bp
mov rax, rdi
je 0x140007b99
add rax, 2
cmp word [rax], bp
jne 0x140007b87
add rax, 2
cmp word [rax], bp
jne 0x140007b87
sub eax, edi
add eax, 2
movsxd rsi, eax
mov rcx, rsi
call fcn.14000ab20
test rax, rax
mov rbx, rax
jne 0x140007bc1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x140007cdb
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call fcn.1400025b0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbx
jmp 0x140007cdb
cmp eax, 2
je 0x140007be9
test eax, eax
jne 0x140007bba
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test rax, rax
mov rsi, rax
je 0x140007bba
cmp byte [rax], bpl
mov rbx, rax
je 0x140007c38
nop
or r9d, 0xffffffff
mov r8, rbx
xor ecx, ecx
lea edx, [r9 + 2]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x140007bba
or rcx, 0xffffffffffffffff
add ebp, eax
mov rdi, rbx
xor eax, eax
repne scasb al, byte [rdi]
not rcx
add rbx, rcx
cmp byte [rbx], al
jne 0x140007c00
add ebp, 1
mov edx, 2
movsxd rcx, ebp
call fcn.14000ab90
test rax, rax
mov r12, rax
jne 0x140007c5d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x140007cdb
cmp byte [rsi], 0
mov qword [rsp + 0x50], r13
mov rbx, rax
mov r13, rsi
je 0x140007cc5
nop
or r9d, 0xffffffff
mov eax, ebp
mov rcx, rbx
sub rcx, r12
lea edx, [r9 + 2]
mov r8, r13
sar rcx, 1
sub eax, ecx
xor ecx, ecx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x140007cee
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasb al, byte [rdi]
mov rdi, rbx
not rcx
add r13, rcx
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp byte [r13], al
not rcx
lea rbx, [rbx + rcx*2]
jne 0x140007c70
mov rcx, rsi
mov word [rbx], 0
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov rax, r12
mov r13, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov rcx, r12
call fcn.140003990
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x140007cd6