joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14002433c
Capabilities:
Get graphical window text

Disassembly:
push rdi
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rsi
movsxd rsi, r8d
mov rdi, rdx
mov rbx, rcx
cmp qword [rcx + 0xa0], 0
jne 0x14002437a
mov r8d, esi
mov rcx, qword [rcx + 0x40]
call qword [sym.imp.USER32.dll_GetWindowTextA]
jmp 0x14002442e
call fcn.1400147f0
mov r11, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140024399
mov ecx, 0x80004005
call fcn.140002a50
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
mov rcx, qword [rbx + 0xa0]
mov rax, qword [rcx]
lea rdx, [rsp + 0x40]
call qword [rax + 0x118]
mov rdx, rsi
or rsi, 0xffffffffffffffff
mov r9, rsi
mov r8, qword [rsp + 0x40]
mov rcx, rdi
call fcn.140041df0
test eax, eax
je 0x140024401
cmp eax, 0xc
je 0x1400243fb
cmp eax, 0x16
je 0x1400243f5
cmp eax, 0x22
je 0x1400243f5
cmp eax, 0x50
je 0x140024401
call fcn.140015230
int3
call fcn.140015230
int3
call fcn.1400151e8
int3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov ecx, esi
lock xadd dword [rdx + 0x10], ecx
add ecx, esi
test ecx, ecx
jg 0x14002442c
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.oledlg.dll_OleUIBusyA + 8]
mov eax, ebx
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140028530
Capabilities:
Set thread local storage value

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
mov esi, 1
mov r14, r8
mov rdi, rdx
cmp dword [rdx + 0x10], esi
mov r12, rcx
mov ebp, esi
jle 0x1400285bd
lea ebx, [rsi + 7]
lea r13d, [rsi + 0xf]
test r14, r14
je 0x140028589
mov rax, qword [r12 + 0x10]
cmp qword [rax + r13 + 8], r14
je 0x140028589
mov rax, qword [rdi + 0x18]
cmp qword [rbx + rax], 0
je 0x1400285a9
xor esi, esi
jmp 0x1400285a9
mov rax, qword [rdi + 0x18]
mov rcx, qword [rbx + rax]
test rcx, rcx
je 0x1400285a0
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rax, qword [rdi + 0x18]
and qword [rbx + rax], 0
add ebp, 1
add r13, 0x10
add rbx, 8
cmp ebp, dword [rdi + 0x10]
jl 0x140028569
test esi, esi
je 0x140028604
lea rcx, [r12 + 0x28]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [r12 + 0x18]
mov rdx, rdi
call fcn.140028050
lea rcx, [r12 + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r11, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [r11]
mov ecx, dword [r12]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r13
pop r12
ret
Function at 0x1400289ec
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x130
mov rax, qword [0x14007b960]
xor rax, rsp
mov qword [rsp + 0x120], rax
test rcx, rcx
mov rbx, rdx
mov rdi, rcx
jne 0x140028a21
call fcn.140015230
int3
test rdx, rdx
jne 0x140028a2c
call fcn.140015230
int3
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [rsp + 0x21]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0x20], 0
mov esi, eax
call fcn.1400421c0
mov r8d, 0x100
cmp esi, r8d
ja 0x140028a7d
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x140028a7d
lea rcx, [rsp + 0x20]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x140028a89
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetWindowTextA]
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.14003dbe0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x140028d40
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x30
test r8d, r8d
mov rbx, rcx
jne 0x140028d52
xor eax, eax
jmp 0x140028d83
mov rcx, qword [rcx + 8]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140028d7f
mov rbx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rbx
mov ecx, eax
call fcn.14002ae14
mov eax, dword [rsp + 0x50]
add rsp, 0x30
pop rbx
ret
Function at 0x14002a480
Capabilities:
Get file attributes
Get file size

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x38
mov rbx, rdx
mov rdi, rcx
mov r8d, 0x128
mov rcx, rbx
xor edx, edx
call fcn.1400421c0
mov r8, qword [rdi + 0x18]
lea rcx, [rbx + 0x22]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.140041df0
xor esi, esi
cmp eax, esi
je 0x14002a4e1
cmp eax, 0xc
je 0x14002a4db
cmp eax, 0x16
je 0x14002a4d5
cmp eax, 0x22
je 0x14002a4d5
cmp eax, 0x50
je 0x14002a4e1
call fcn.140015230
int3
call fcn.140015230
int3
call fcn.1400151e8
int3
mov rcx, qword [rdi + 8]
cmp rcx, qword [0x140061038]
je 0x14002a63f
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileTime]
cmp eax, esi
jne 0x14002a512
xor eax, eax
jmp 0x14002a644
mov rcx, qword [rdi + 8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, 0xffffffff
mov r11d, eax
cmp r11, rbp
mov qword [rbx + 0x18], r11
je 0x14002a50b
mov rcx, qword [rdi + 0x18]
cmp dword [rcx - 0x10], esi
jne 0x14002a53e
mov byte [rbx + 0x20], sil
jmp 0x14002a54f
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
movzx ecx, al
cmp eax, ebp
cmove ecx, esi
mov byte [rbx + 0x20], cl
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x14002a592
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x14002a592
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.14002a3c0
mov rcx, qword [rax]
mov qword [rbx], rcx
jmp 0x14002a595
mov qword [rbx], rsi
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x14002a5d9
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x14002a5d9
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.14002a3c0
mov rax, qword [rax]
mov qword [rbx + 0x10], rax
jmp 0x14002a5dd
mov qword [rbx + 0x10], rsi
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
cmp eax, esi
je 0x14002a621
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, esi
je 0x14002a621
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x78]
or r8d, 0xffffffff
call fcn.14002a3c0
mov rax, qword [rax]
mov qword [rbx + 8], rax
jmp 0x14002a625
mov qword [rbx + 8], rsi
cmp qword [rbx], rsi
jne 0x14002a631
mov rax, qword [rbx + 8]
mov qword [rbx], rax
cmp qword [rbx + 0x10], rsi
jne 0x14002a63f
mov rax, qword [rbx + 8]
mov qword [rbx + 0x10], rax
mov eax, 1
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14003f330
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 [0x1400810a0]
mov ebx, r9d
mov rdi, r8
mov rsi, rdx
call fcn.140045c00
test rax, rax
je 0x14003f384
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 0x14003f419
mov ecx, 2
call fcn.14004af80
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x98
call fcn.1400421c0
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 0x14003f405
test ebx, ebx
jne 0x14003f405
lea ecx, [rax + 2]
call fcn.14004af80
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 0x14003f440
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x5b8
mov rcx, qword [0x1400810a0]
call fcn.140045c00
test rax, rax
je 0x14003f475
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], 0
call rax
add rsp, 0x5b8
ret
mov ecx, 2
mov qword [rsp + 0x5b0], rbx
call fcn.14004af80
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x98
call fcn.1400421c0
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 0x14003f4fe
test ebx, ebx
jne 0x14003f4fe
lea ecx, [rax + 2]
call fcn.14004af80
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc000000d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rbx, qword [rsp + 0x5b0]
add rsp, 0x5b8
ret
Function at 0x1400407a0
Capabilities:
Get system information on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0xb0
lea rbp, [rsp + 0x30]
mov qword [rbp + 0xb0], rbx
mov qword [rbp + 0xb8], rsi
mov qword [rbp + 0xc0], rdi
mov rax, qword [0x14007b960]
xor rax, rbp
mov qword [rbp + 0x70], rax
mov eax, dword [rsp]
xor ebx, ebx
mov dword [rbp], ebx
sub rsp, 0x10
lea r13, [rsp + 0x30]
mov eax, dword [r13]
lea r8d, [rbx + 0x30]
lea rdx, [rbp + 0x10]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14004090c
mov r14, qword [rbp + 0x18]
lea rcx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edi, dword [rbp + 0x44]
lea rcx, [rbp]
call fcn.140042380
test eax, eax
je 0x14004083a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.14003f290
mov ecx, dword [rbp]
cmp ecx, 2
jne 0x140040882
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x14004087f
lea rdx, str.SetThreadStackGuarantee
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14004087f
lea rcx, [rbp + 4]
mov dword [rbp + 4], ebx
call rax
cmp eax, 1
jne 0x14004087f
mov eax, dword [rbp + 4]
test eax, eax
cmovne ebx, eax
mov ecx, dword [rbp]
mov r15d, 1
lea r8d, [rdi - 1]
lea edx, [rbx + rdi - 1]
cmp ecx, r15d
mov eax, r8d
mov esi, 0x104
not eax
cmove esi, r15d
and edx, eax
je 0x1400408a7
add edx, edi
lea eax, [rdi + rdi]
mov ebx, r8d
cmp edx, eax
not rbx
cmovb edx, eax
and rbx, r13
mov eax, reloc.WS2_32.dll_recvfrom
mov r12d, edx
sub rbx, r12
cmp ecx, r15d
cmove edi, eax
mov eax, edi
add rax, r14
cmp rbx, rax
jb 0x14004090c
mov r9d, 4
mov r8d, 0x1000
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x14004090c
lea r9, [rbp + 8]
mov r8d, esi
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x14004090c
mov eax, r15d
jmp 0x14004090e
xor eax, eax
mov rcx, qword [rbp + 0x70]
xor rcx, rbp
call fcn.14003dbe0
mov rbx, qword [rbp + 0xb0]
mov rsi, qword [rbp + 0xb8]
mov rdi, qword [rbp + 0xc0]
lea rsp, [rbp + 0x80]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x1400485f7
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x14007b960]
jne 0x14003dbfa
rol rcx, 0x10
test cx, 0xffff
jne 0x14003dbf6
repz ret
ror rcx, 0x10
jmp 0x140048550
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140081220]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140081318]
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 0x1400485d5
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, [0x140081220]
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 0x1400485f7
mov rax, qword [rsp + 0x88]
mov qword [0x140081318], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x1400812b8], rax
mov rax, qword [0x140081318]
mov qword [0x140081190], rax
mov rax, qword [rsp + 0x90]
mov qword [0x1400812a0], rax
mov dword [0x140081180], 0xc0000409
mov dword [0x140081184], 1
mov rax, qword [0x14007b960]
mov qword [rsp + 0x68], rax
mov rax, qword [0x14007b968]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140081218], eax
mov ecx, 1
call fcn.14004af80
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x140064080]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140081218], 0
jne 0x14004867e
mov ecx, 1
call fcn.14004af80
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 0x14004af90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
sub rsp, 0x30
lea r12, reloc.OLEAUT32.dll_SysReAllocString
xor esi, esi
mov edi, ecx
mov rax, r12
mov ebx, esi
nop
cmp ecx, dword [rax]
je 0x14004afce
add ebx, 1
add rax, 0x10
cmp ebx, 0x17
jb 0x14004afb0
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
cmp ebx, 0x17
jae 0x14004b1b5
mov ecx, 3
call fcn.140056700
cmp eax, 1
je 0x14004b16c
mov ecx, 3
call fcn.140056700
test eax, eax
jne 0x14004b005
cmp dword [reloc.OLEAUT32.dll_SysReAllocString], 1
je 0x14004b16c
cmp edi, 0xfc
je 0x14004b1b5
mov qword [rsp + 0x50], rbp
lea rbp, [0x140081710]
lea r8, str.Runtime_Error__n_nProgram:
mov rcx, rbp
mov edx, 0x314
call fcn.14003fd90
test eax, eax
je 0x14004b049
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14003f290
lea rdx, [0x140081729]
mov r8d, 0x104
xor ecx, ecx
mov byte [0x14008182d], sil
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x14004b099
lea r8, str._program_name_unknown_
lea rcx, [0x140081729]
mov edx, 0x2fb
call fcn.14003fd90
test eax, eax
je 0x14004b099
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14003f290
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [0x140081729]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 0x3c
jbe 0x14004b0e8
lea rcx, [rcx + rbp - 0x23]
lea rdx, [0x140081a24]
lea r9d, [rax + 3]
lea r8, [0x140064664]
sub rdx, rcx
call fcn.140042d60
test eax, eax
je 0x14004b0e8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14003f290
lea r8, [0x140064660]
mov edx, 0x314
mov rcx, rbp
call fcn.14003efe0
test eax, eax
je 0x14004b114
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14003f290
movsxd r8, ebx
mov edx, 0x314
mov rcx, rbp
add r8, r8
mov r8, qword [r12 + r8*8 + 8]
call fcn.14003efe0
test eax, eax
je 0x14004b144
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14003f290
lea rdx, str.Microsoft_Visual_C_Runtime_Library
mov r8d, 0x12010
mov rcx, rbp
call fcn.1400564a0
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 0x14004b1b5
cmp rax, 0xffffffffffffffff
je 0x14004b1b5
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 0x14004d180
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov eax, dword [0x140081b68]
test eax, eax
jne 0x14004d1d3
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14004d1b3
mov dword [0x140081b68], 1
jmp 0x14004d1ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x14004d1cd
mov dword [0x140081b68], 2
jmp 0x14004d2c9
mov eax, dword [0x140081b68]
cmp eax, 1
jne 0x14004d2c0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14004d313
cmp word [rdi], 0
mov qword [rsp + 0x50], rbp
mov rbx, rdi
mov qword [rsp + 0x58], r12
je 0x14004d215
add rbx, 2
cmp word [rbx], 0
jne 0x14004d201
add rbx, 2
cmp word [rbx], 0
jne 0x14004d201
xor r12d, r12d
sub rbx, rdi
mov r8, rdi
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
sar rbx, 1
lea r9d, [rbx + 1]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
movsxd rbp, eax
je 0x14004d2b3
mov rcx, rbp
call fcn.14004bad0
test rax, rax
mov rsi, rax
je 0x14004d2b3
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
lea r9d, [rbx + 1]
mov r8, rdi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x14004d28d
mov rcx, rsi
call fcn.14003f860
mov rsi, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbp, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x14004d299
cmp eax, 2
je 0x14004d2c9
test eax, eax
jne 0x14004d313
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test rax, rax
mov rbx, rax
je 0x14004d313
cmp byte [rax], 0
je 0x14004d2f2
nop
add rax, 1
cmp byte [rax], 0
jne 0x14004d2e0
add rax, 1
cmp byte [rax], 0
jne 0x14004d2e0
sub eax, ebx
add eax, 1
movsxd rsi, eax
mov rcx, rsi
call fcn.14004bad0
test rax, rax
mov rdi, rax
jne 0x14004d325
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140042a20
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rax, rdi
add rsp, 0x40
pop rdi
ret
Function at 0x1400564a0
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x50
mov edi, r8d
mov r13, rdx
mov r14, rcx
call fcn.140045b10
xor ebx, ebx
cmp qword [0x140081ed8], rbx
mov rbp, rax
mov dword [rsp + 0x98], ebx
mov dword [rsp + 0x30], ebx
jne 0x1400565cc
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rsi, rax
je 0x1400566df
lea rdx, [0x140065118]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400566df
mov rcx, rax
call fcn.140045a40
lea rdx, [0x140065108]
mov rcx, rsi
mov qword [0x140081ed8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140045a40
lea rdx, [0x1400650f0]
mov rcx, rsi
mov qword [0x140081ee0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140045a40
lea rcx, [rsp + 0x98]
mov qword [0x140081ee8], rax
call fcn.140042380
test eax, eax
je 0x14005657f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.14003f290
cmp dword [rsp + 0x98], 2
jne 0x1400565cc
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140045a40
test rax, rax
mov qword [0x140081ef8], rax
je 0x1400565cc
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.140045a40
mov qword [0x140081ef0], rax
mov rcx, qword [0x140081ef0]
mov qword [rsp + 0x80], r12
cmp rcx, rbp
je 0x140056678
cmp qword [0x140081ef8], rbp
je 0x140056678
call fcn.140045c00
mov rcx, qword [0x140081ef8]
mov rsi, rax
call fcn.140045c00
test rsi, rsi
mov r12, rax
je 0x140056678
test rax, rax
je 0x140056678
call rsi
test rax, rax
je 0x140056643
lea rcx, [rsp + 0x34]
mov r9d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x140056643
test byte [rsp + 0x40], 1
jne 0x140056678
lea rcx, [rsp + 0x30]
call fcn.1400423d0
test eax, eax
je 0x140056665
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.14003f290
cmp dword [rsp + 0x30], 4
jb 0x140056672
bts edi, 0x15
jmp 0x1400566b6
bts edi, 0x12
jmp 0x1400566b6
mov rcx, qword [0x140081ee0]
cmp rcx, rbp
je 0x1400566b6
call fcn.140045c00
test rax, rax
je 0x1400566b6
call rax
test rax, rax
mov rbx, rax
je 0x1400566b6
mov rcx, qword [0x140081ee8]
cmp rcx, rbp
je 0x1400566b6
call fcn.140045c00
test rax, rax
je 0x1400566b6
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140081ed8]
call fcn.140045c00
mov r12, qword [rsp + 0x80]
test rax, rax
je 0x1400566df
mov r9d, edi
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x1400566e1
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret