joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006b5a0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x1401340c0]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rdi, qword [0x1401a0b48]
mov rbx, r8
lea rsi, [rdi + 0x164]
lea rcx, [rdi + 0x16c]
mov dword [rsi], 1
call fcn.1400f5c00
mov dword [rdi + 0x168], ebx
add rbx, 8
je 0x14006b677
mov rax, qword [rdi]
test rax, rax
je 0x14006b635
mov rcx, qword [rax + 8]
cmp rcx, 0xffffffffffffffff
je 0x14006b635
test rsi, rsi
je 0x14006b635
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], 0
mov r8d, ebx
mov qword [rsp + 0x20], 0
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x14006b635
cmp dword [rsp + 0x30], ebx
je 0x14006b677
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x14006b654
mov eax, dword [rdi + 8]
dec eax
test eax, 0xfffffffd
jne 0x14006b654
mov ecx, dword [rdi + 0x60]
lea rdx, [rdi + 0x64]
call r8
mov rbx, qword [rdi]
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
xor al, al
mov byte [rbx], 0
mov dword [rdi + 8], 0
jmp 0x14006b679
mov al, 1
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140075810
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x140072fa0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
cmp qword [rsp + 0x80], 0
jg 0x140072fc5
xor eax, eax
jmp 0x140073186
mov rax, qword [rsp + 0x70]
cmp qword [rax + 0x68], 0
je 0x140072fed
mov r8, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call fcn.140061ad0
jmp 0x140073186
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov rcx, qword [rsp + 0x70]
call fcn.140063bc0
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jbe 0x14007308a
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x20]
call fcn.14004d770
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x70]
call fcn.140063c70
mov r8, qword [rsp + 0x28]
mov rdx, rax
mov rcx, qword [rsp + 0x78]
call fcn.14004d780
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov edx, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x70]
call fcn.140063c30
nop
mov rax, qword [rsp + 0x70]
cmp qword [rax + 0x80], 0
je 0x140073176
mov rcx, qword [rsp + 0x70]
call fcn.140071dc0
mov qword [rsp + 0x58], 0xfff
cmp qword [rsp + 0x20], 0xfff
jbe 0x14007312a
mov rax, qword [rsp + 0x70]
mov r9, qword [rax + 0x80]
mov r8d, 0xfff
mov edx, 1
mov rcx, qword [rsp + 0x78]
call fcn.140099450
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x30], 0xfff
je 0x140073128
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
jmp 0x140073186
jmp 0x1400730b0
cmp qword [rsp + 0x20], 0
jbe 0x140073176
mov rax, qword [rsp + 0x70]
mov r9, qword [rax + 0x80]
mov r8, qword [rsp + 0x20]
mov edx, 1
mov rcx, qword [rsp + 0x78]
call fcn.140099450
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
add rsp, 0x68
ret
Function at 0x1400765c0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.140076080
movzx eax, al
test eax, eax
jne 0x1400765e0
mov ecx, 7
call fcn.140077010
nop
mov byte [rsp + 0x20], 0
call fcn.140076010
mov byte [rsp + 0x21], al
cmp dword [0x140169d00], 1
jne 0x140076604
mov ecx, 7
call fcn.140077010
nop
jmp 0x14007665c
cmp dword [0x140169d00], 0
jne 0x140076657
mov dword [0x140169d00], 1
lea rdx, [0x1400faa48]
lea rcx, [0x1400faa00]
call fcn.1400b79d0
test eax, eax
je 0x140076638
mov eax, 0xff
jmp 0x140076761
lea rdx, [0x1400fa9f8]
lea rcx, [0x1400fa560]
call fcn.1400b7960
mov dword [0x140169d00], 2
jmp 0x14007665c
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.140076270
call fcn.140077540
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x1400766b9
mov rcx, qword [rsp + 0x30]
call fcn.1400761e0
movzx eax, al
test eax, eax
je 0x1400766b9
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x1400fa538]
nop
call fcn.140077550
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x1400766ed
mov rcx, qword [rsp + 0x38]
call fcn.1400761e0
movzx eax, al
test eax, eax
je 0x1400766ed
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.1400a4120
nop
call fcn.140076770
mov dword [rsp + 0x28], eax
call fcn.1400771c0
movzx eax, al
test eax, eax
jne 0x14007670c
mov ecx, dword [rsp + 0x28]
call fcn.1400a4170
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x14007671b
call fcn.1400a40e0
nop
xor edx, edx
mov cl, 1
call fcn.1400762a0
mov eax, dword [rsp + 0x28]
jmp 0x140076761
add rsp, 0x68
ret

Function at 0x1400803f0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.14007fed0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14008042f
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x1400fa538]
jmp 0x140080439
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rsp, 0x48
ret
Function at 0x1400c0740
Capabilities:
Get geographical location

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x58
call fcn.1400bfb60
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x1400c07a7
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x40], rax
movabs r10, 0xe375262d7cd44270
mov r9d, dword [rsp + 0x78]
mov r8, qword [rsp + 0x70]
mov edx, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x40]
call qword [0x1400fa540]
jmp 0x1400c07c9
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.1400c0ba0
mov r9d, dword [rsp + 0x78]
mov r8, qword [rsp + 0x70]
mov edx, dword [rsp + 0x68]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
add rsp, 0x58
ret
Function at 0x1400c26d0
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.1400ed2b0
sub rsp, rax
mov rax, qword [0x1401340c0]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14016a970]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x1400c28c2
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x1400c2816
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x1400c2816
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x1400c27fb
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x1400c2798
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400c2882
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400c28e1
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x1400c28bd
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400c28e1
jmp 0x1400c276e
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.140075810
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1400c2900
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.1400ed2b0
sub rsp, rax
mov rax, qword [0x1401340c0]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14016a970]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x1400c2b0d
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x1400c2a59
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x1400c2a59
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x1400c2a39
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x1400c29c8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400c2acd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400c2b2c
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x1400c2b08
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400c2b2c
jmp 0x1400c299e
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.140075810
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1400cb7e0
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret
Function at 0x1400d8e50
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140075070
lea rcx, [rsp + 0x40]
call fcn.1400d8e10
movzx eax, al
test eax, eax
jne 0x1400d8e98
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.1400d8d20
mov rax, qword [rsp + 0x70]
jmp 0x1400d9069
lea rcx, [rsp + 0x40]
call fcn.140070240
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.1400d8dc0
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140070240
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.1400ce330
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1400d8f3e
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.1400d8d20
mov rax, qword [rsp + 0x80]
jmp 0x1400d9069
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.1400a94f0
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140075070
lea rcx, [rsp + 0x48]
call fcn.1400757b0
movzx eax, al
test eax, eax
jne 0x1400d8fa5
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.140075790
lea rcx, [rsp + 0x40]
call fcn.1400d8d20
mov rax, qword [rsp + 0x88]
jmp 0x1400d9069
lea rcx, [rsp + 0x48]
call fcn.140070240
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140070240
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.1400ce330
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x1400d903b
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.140075790
lea rcx, [rsp + 0x40]
call fcn.1400d8d20
mov rax, qword [rsp + 0xa0]
jmp 0x1400d9069
lea rcx, [rsp + 0x48]
call fcn.1400797d0
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.140075790
lea rcx, [rsp + 0x40]
call fcn.1400d8d20
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x1400d9080
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x78
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140075070
lea rcx, [rsp + 0x20]
call fcn.1400d8d40
movzx eax, al
test eax, eax
jne 0x1400d90c5
mov qword [rsp + 0x40], 0
lea rcx, [rsp + 0x20]
call fcn.1400d8d20
mov rax, qword [rsp + 0x40]
jmp 0x1400d91bf
lea rcx, [rsp + 0x20]
call fcn.140070240
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x30]
call fcn.1400d8dc0
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
shl rax, 1
mov r9d, 0x40
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, rax
call fcn.1400a94f0
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140075070
lea rcx, [rsp + 0x28]
call fcn.1400757b0
movzx eax, al
test eax, eax
jne 0x1400d915f
mov qword [rsp + 0x50], 0
lea rcx, [rsp + 0x28]
call fcn.140081b50
lea rcx, [rsp + 0x20]
call fcn.1400d8d20
mov rax, qword [rsp + 0x50]
jmp 0x1400d91bf
lea rcx, [rsp + 0x20]
call fcn.140070240
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x28]
call fcn.140070240
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x38]
shl rax, 1
mov r8, rax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
call fcn.1400f5c00
lea rcx, [rsp + 0x28]
call fcn.1400797d0
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x28]
call fcn.140081b50
lea rcx, [rsp + 0x20]
call fcn.1400d8d20
mov rax, qword [rsp + 0x68]
add rsp, 0x78
ret

Function at 0x1400da8f0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x28
ret
Function at 0x1400e8390
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x128
lea rcx, [rsp + 0xe8]
call fcn.1400a9cb0
lea rcx, [rsp + 0xb8]
call fcn.1400a9cb0
lea rcx, [rsp + 0x88]
call fcn.1400a9cb0
call fcn.1400cb4d0
mov r8d, eax
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0x130]
call fcn.1400a9ba0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x1400e8432
mov dword [rsp + 0x54], 0
lea rcx, [rsp + 0x88]
call fcn.1400a9d40
lea rcx, [rsp + 0xb8]
call fcn.1400a9d40
lea rcx, [rsp + 0xe8]
call fcn.1400a9d40
mov eax, dword [rsp + 0x54]
jmp 0x1400e85d8
call fcn.1400cb4d0
mov r8d, eax
lea rdx, [rsp + 0xb8]
mov rcx, qword [rsp + 0x138]
call fcn.1400a9ba0
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
je 0x1400e8492
mov dword [rsp + 0x5c], 0
lea rcx, [rsp + 0x88]
call fcn.1400a9d40
lea rcx, [rsp + 0xb8]
call fcn.1400a9d40
lea rcx, [rsp + 0xe8]
call fcn.1400a9d40
mov eax, dword [rsp + 0x5c]
jmp 0x1400e85d8
mov qword [rsp + 0x70], 0
cmp qword [rsp + 0x168], 0
je 0x1400e8518
call fcn.1400cb4d0
mov r8d, eax
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x168]
call fcn.1400a9ba0
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x1400e8506
mov dword [rsp + 0x64], 0
lea rcx, [rsp + 0x88]
call fcn.1400a9d40
lea rcx, [rsp + 0xb8]
call fcn.1400a9d40
lea rcx, [rsp + 0xe8]
call fcn.1400a9d40
mov eax, dword [rsp + 0x64]
jmp 0x1400e85d8
lea rcx, [rsp + 0x88]
call fcn.1400a0b30
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0xb8]
call fcn.1400a0b30
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0xe8]
call fcn.1400a0b30
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x170]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x158]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x150]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x148]
mov r8, qword [rsp + 0x140]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [rsp + 0x68], eax
lea rcx, [rsp + 0x88]
call fcn.1400a9d40
lea rcx, [rsp + 0xb8]
call fcn.1400a9d40
lea rcx, [rsp + 0xe8]
call fcn.1400a9d40
mov eax, dword [rsp + 0x68]
add rsp, 0x128
ret
Function at 0x1400ea0a0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.1400a9cb0
lea rcx, [rsp + 0x48]
call fcn.1400a9cb0
call fcn.1400cb4d0
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.1400a9ba0
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x1400ea10f
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.1400a9d40
lea rcx, [rsp + 0x78]
call fcn.1400a9d40
mov eax, dword [rsp + 0x24]
jmp 0x1400ea1a0
call fcn.1400cb4d0
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.1400a9ba0
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x1400ea156
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.1400a9d40
lea rcx, [rsp + 0x78]
call fcn.1400a9d40
mov eax, dword [rsp + 0x2c]
jmp 0x1400ea1a0
lea rcx, [rsp + 0x48]
call fcn.1400a0b30
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.1400a0b30
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.1400a9d40
lea rcx, [rsp + 0x78]
call fcn.1400a9d40
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x2fc4c5010
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.2fc4c60d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4c5a12
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4ea108]
test eax, eax
je 0x2fc4c5aaa
lea rax, [0x2fc4ea0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4ea110]
mov qword [rbp - 8], rax
jmp 0x2fc4c5a8e
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 0x2fc4c5a82
cmp qword [rbp - 0x10], 0
je 0x2fc4c5a82
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 0x2fc4c5a48
lea rax, [0x2fc4ea0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4c5aab
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4c5bb0
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 0x2fc4c5bd8
mov eax, 0
jmp 0x2fc4c5c26
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 0x2fc4c5c01
mov eax, 0
jmp 0x2fc4c5c26
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 0x2fc4c5c21
mov eax, 0
jmp 0x2fc4c5c26
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4c5c2c
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 0x2fc4c5caa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4c5ca1
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 0x2fc4c5ca1
mov rax, qword [rbp - 8]
jmp 0x2fc4c5cbf
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 0x2fc4c5c74
mov eax, 0
add rsp, 0x20
pop rbp
ret