joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140077ce0
Capabilities:
Query environment variable

Disassembly:
push r15
mov eax, 0x10088
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.1400f1190
sub rsp, rax
xor edx, edx
mov rbp, rcx
xor ecx, ecx
mov word [rsp + 0x80], dx
lea r15, [rsp + 0x30]
movzx eax, byte [rbp]
mov word [rsp + 0x30], cx
test al, al
je 0x140077da5
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14010209e
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x140077d86
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140077d78
test rsi, rsi
je 0x14010209e
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140077d38
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x140077dd4
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10088
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140077df0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movzx eax, byte [rcx]
mov qword [rsp + 0xd8], rdx
xor edx, edx
mov rbp, rcx
lea r15, [rsp + 0x30]
mov word [rsp + 0x30], dx
test al, al
je 0x140077ead
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1401020a4
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x140077e8e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140077e80
test rsi, rsi
je 0x1401020a4
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140077e40
mov rdx, qword [rsp + 0xd8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140096f10
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.140077ce0
test rax, rax
je 0x140097060
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python312.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r15, r14
lea r12, [rsi + 0x28]
mov word [rsp + 0x40], cx
mov r13, rax
lea rbp, [rsp + 0x3a]
mov eax, 0x4e
lea rdi, [rsp + 0x3c]
nop word [rax + rax]
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, rsi
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x140102144
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x140096fc6
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x140096fb8
test rbx, rbx
je 0x140102144
mov word [rax], dx
add rsi, 1
xor edx, edx
add r15, 2
mov word [rax + 2], dx
movzx eax, byte [rsi]
test al, al
jne 0x140096f78
mov rcx, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call qword [sym.imp.python312.dll_PyThreadState_Get]
mov rcx, qword [0x140129520]
mov rsi, rax
mov rax, qword [0x140115a10]
mov rbx, qword [rax + 0x1c0]
test rcx, rcx
je 0x1400970d5
mov rdx, rbx
call fcn.1400684d0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.14008b000
mov rdx, qword [rbx]
test edx, edx
js 0x140097042
sub rdx, 1
mov qword [rbx], rdx
je 0x1400970bd
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x140128de0]
lea rsi, [0x140128de0]
test bl, bl
je 0x140097080
mov rax, qword [0x140128de8]
lea rsi, [0x140128de8]
test rax, rax
jne 0x140097042
cmp byte [0x140129002], 0
jne 0x140097096
movzx ecx, bl
call fcn.140069d10
mov rdx, 0xffffffffffffffff
lea rcx, [0x140128e00]
call qword [sym.imp.python312.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x1400970ff
mov edx, dword [rax]
add edx, 1
je 0x140097042
mov dword [rax], edx
jmp 0x140097042
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [sym.imp.python312.dll__Py_Dealloc]
mov rax, qword [rsp + 0x28]
jmp 0x140097042
mov rcx, qword [0x140129498]
mov rdi, qword [rax + 0x1b0]
test rcx, rcx
je 0x14009710a
mov rdx, rdi
call fcn.1400684d0
mov qword [0x140129520], rax
mov rcx, rax
jmp 0x140097019
call qword [sym.imp.python312.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x14010d6fb]
call qword [sym.imp.python312.dll_PyImport_ImportModule]
mov qword [0x140129498], rax
mov rcx, rax
test rax, rax
je 0x140102144
jmp 0x1400970e8
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
Function at 0x1400ed910
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x140128dc1], 0
mov rbp, rcx
mov r12, rdx
mov rdi, r8
je 0x1400ed998
lea rdx, [0x14011195a]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400eda00
mov rbx, qword [0x140128c60]
jmp 0x1400ed955
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x1400ed950
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, rbp
mov rdx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1400dd950
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x140128c60], rax
mov ebx, dword [rax]
mov qword [0x140128c60], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x140128c60], rdx
call fcn.1400eca40
cmp eax, ebx
jne 0x1400eda68
mov byte [0x140128dc1], 1
jmp 0x1400ed92c
cmp byte [0x140128dc0], 0
jne 0x1400ed943
mov rbx, qword [sym.imp.python312.dll_PyDict_New]
call rbx
mov qword [0x140129728], rax
call rbx
mov qword [0x140129720], rax
call rbx
mov qword [0x140129718], rax
call rbx
mov qword [0x140129710], rax
call rbx
mov qword [0x140129708], rax
call rbx
mov qword [0x140129700], rax
call rbx
mov qword [0x1401296f8], rax
call rbx
mov byte [0x140128dc0], 1
mov qword [0x1401296f0], rax
jmp 0x1400ed943
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x1400efe70
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 fcn.1401015f0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1401015f0
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x1400f0b42
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140129be8]
test eax, eax
je 0x1400f0bda
lea rax, [0x140129bc0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140129bf0]
mov qword [rbp - 8], rax
jmp 0x1400f0bbe
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 0x1400f0bb2
cmp qword [rbp - 0x10], 0
je 0x1400f0bb2
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 0x1400f0b78
lea rax, [0x140129bc0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400f0bdb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400f0ce0
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 0x1400f0d08
mov eax, 0
jmp 0x1400f0d56
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 0x1400f0d31
mov eax, 0
jmp 0x1400f0d56
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 0x1400f0d51
mov eax, 0
jmp 0x1400f0d56
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400f0d5c
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 0x1400f0dda
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400f0dd1
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 0x1400f0dd1
mov rax, qword [rbp - 8]
jmp 0x1400f0def
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 0x1400f0da4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400062d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x168
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov qword [rsp + 0x28], 0
lea r9, [rsp + 0x28]
lea r8, [rsp + 0x40]
mov edx, 0x104
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0xffffffff
je 0x14000633c
mov eax, dword [rsp + 0x20]
and eax, 0x10
test eax, eax
je 0x14000633c
mov eax, 1
jmp 0x140006382
cmp qword [rsp + 0x28], 0
je 0x140006380
mov rax, qword [rsp + 0x28]
mov byte [rax], 0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0xffffffff
je 0x14000637c
mov eax, dword [rsp + 0x20]
and eax, 0x10
test eax, eax
je 0x140006376
mov eax, 1
jmp 0x140006382
xor eax, eax
jmp 0x140006382
xor eax, eax
jmp 0x140006382
xor eax, eax
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140021740
add rsp, 0x168
ret
Function at 0x1400080a0
Capabilities:
Enumerate files on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2b8
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
mov dword [rsp + 0x34], 0
lea rax, [0x140002bf8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x2c0]
lea r8, [0x140002bec]
mov edx, 0x105
lea rcx, [rsp + 0x40]
call fcn.14001f670
mov dword [rsp + 0x158], eax
cmp dword [rsp + 0x158], 0
je 0x14000810a
mov eax, dword [rsp + 0x34]
jmp 0x1400081a9
lea rdx, [rsp + 0x160]
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov qword [rsp + 0x150], rax
cmp qword [rsp + 0x150], 0xffffffffffffffff
je 0x14000819d
mov eax, dword [rsp + 0x160]
and eax, 0x10
test eax, eax
jne 0x140008162
lea rcx, [rsp + 0x18c]
call qword [sym.imp.msvcrt.dll_atol]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x30], eax
jbe 0x140008162
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x34], eax
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140008130
cmp dword [rsp + 0x34], 0
je 0x14000818d
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov rcx, qword [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x1400081a5
mov dword [rsp + 0x34], 1
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.140021740
add rsp, 0x2b8
ret

Function at 0x1400081d0
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x598
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x580], rax
mov dword [rsp + 0x570], 0
lea rax, [0x140002c08]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x5a0]
lea r8, [0x140002bec]
mov edx, 0x105
lea rcx, [rsp + 0x460]
call fcn.14001f670
mov dword [rsp + 0x574], eax
cmp dword [rsp + 0x574], 0
je 0x140008252
mov eax, dword [rsp + 0x574]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140008335
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x460]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x578], rax
cmp qword [rsp + 0x578], 0xffffffffffffffff
jne 0x14000829e
xor eax, eax
jmp 0x140008335
xor edx, edx
mov rcx, qword [rsp + 0x578]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xa
jbe 0x140008306
lea r9, [rsp + 0x450]
lea r8, [rsp + 0x50]
mov edx, 0x400
mov rcx, qword [rsp + 0x578]
call fcn.140020a50
mov dword [rsp + 0x454], eax
cmp dword [rsp + 0x454], 1
jbe 0x140008306
cmp dword [rsp + 0x450], 0xa
jbe 0x140008304
mov byte [rsp + 0x5b], 0
lea rcx, [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_atol]
mov dword [rsp + 0x570], eax
jmp 0x1400082b3
mov rcx, qword [rsp + 0x578]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x570], 0
je 0x14000832e
mov eax, dword [rsp + 0x570]
inc eax
mov dword [rsp + 0x570], eax
mov eax, dword [rsp + 0x570]
mov rcx, qword [rsp + 0x580]
xor rcx, rsp
call fcn.140021740
add rsp, 0x598
ret
Function at 0x14000b630
Capabilities:
Check if file exists

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x188
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x178], rax
mov qword [rsp + 0x170], 0xffffffffffffffff
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x50], 0
mov eax, dword [rsp + 0x198]
and eax, 1
test eax, eax
je 0x14000b6de
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x60]
mov edx, 0x105
mov rcx, qword [rsp + 0x190]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jbe 0x14000b6c9
lea rcx, [rsp + 0x60]
call qword [sym.imp.dbghelp.dll_MakeSureDirectoryPathExists]
test eax, eax
jne 0x14000b6bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
jmp 0x14000b6c7
mov dword [rsp + 0x50], 0
jmp 0x14000b6de
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14000b7e3
lea rax, [0x140003130]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x190]
lea r8, [0x140002bec]
mov edx, 0x105
lea rcx, [rsp + 0x60]
call fcn.14001f670
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0
jne 0x14000b7cc
cmp dword [rsp + 0x40], 0xc8
jae 0x14000b7ca
cmp qword [rsp + 0x170], 0xffffffffffffffff
jne 0x14000b7ca
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x4000000
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x170], rax
cmp qword [rsp + 0x170], 0xffffffffffffffff
jne 0x14000b7c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 2
je 0x14000b799
cmp dword [rsp + 0x50], 3
jne 0x14000b7a3
mov dword [rsp + 0x40], 0x270f
jmp 0x14000b7c5
call qword [sym.imp.msvcrt.dll_rand]
cdq
mov ecx, 0xfa
idiv ecx
mov eax, edx
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
jmp 0x14000b722
jmp 0x14000b7e3
mov eax, dword [rsp + 0x54]
and eax, 0xffff
mov dword [rsp + 0x50], eax
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x170]
mov rcx, qword [rsp + 0x178]
xor rcx, rsp
call fcn.140021740
add rsp, 0x188
ret
Function at 0x14000bb00
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x470
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x468], rax
mov dword [rsp + 0x44], 0
mov r9, qword [rsp + 0x480]
lea r8, [0x140003030]
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.14001f670
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14000bcd7
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.14000b630
mov qword [rsp + 0x460], rax
cmp qword [rsp + 0x460], 0xffffffffffffffff
je 0x14000bcd5
mov r9, qword [rsp + 0x480]
lea r8, [0x140003040]
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.14001f670
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14000bcaa
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14000bca8
mov rax, qword [rsp + 0x490]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x488]
lea r8, [0x140003168]
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.14001f670
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14000bc8c
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov rcx, 0xffffffffffffffff
lea rdx, [rsp + 0x60]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, eax
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [rsp + 0x44], 1
jmp 0x14000bc9d
mov eax, dword [rsp + 0x50]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000bcbb
mov eax, dword [rsp + 0x50]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x460]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x460], 0xffffffffffffffff
jmp 0x14000bce8
mov eax, dword [rsp + 0x50]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x468]
xor rcx, rsp
call fcn.140021740
add rsp, 0x470
pop rdi
ret
Function at 0x140016d00
Capabilities:
Get system information on windows

Disassembly:
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x60
mov ecx, 0x18
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140016d28
xor eax, eax
jmp 0x140016e87
mov rdi, qword [rsp + 0x28]
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
cmp dword [rsp + 0x70], 0
jne 0x140016d8c
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x50]
lea eax, [rax*4 - 1]
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax]
cmp eax, 1
jae 0x140016d73
mov rax, qword [rsp + 0x28]
mov dword [rax], 1
jmp 0x140016d8a
mov rax, qword [rsp + 0x28]
mov eax, dword [rax]
cmp eax, 0x40
jbe 0x140016d8a
mov rax, qword [rsp + 0x28]
mov dword [rax], 0x40
jmp 0x140016dbd
cmp dword [rsp + 0x70], 0x40
jbe 0x140016db2
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.msvcrt.dll_free]
xor eax, eax
jmp 0x140016e87
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x70]
mov dword [rax], ecx
mov rax, qword [rsp + 0x28]
mov dword [rax + 4], 0
mov rax, qword [rsp + 0x28]
mov eax, dword [rax]
mov eax, eax
shl rax, 3
mov rcx, rax
call qword [sym.imp.msvcrt.dll_malloc]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x28]
cmp qword [rax + 0x10], 0
jne 0x140016e06
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.msvcrt.dll_free]
xor eax, eax
jmp 0x140016e87
mov dword [rsp + 0x20], 0
jmp 0x140016e1a
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax]
cmp dword [rsp + 0x20], eax
jae 0x140016e3e
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
mov qword [rcx + rax*8], 0xffffffffffffffff
jmp 0x140016e10
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
test rax, rax
jne 0x140016e82
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.msvcrt.dll_free]
xor eax, eax
jmp 0x140016e87
mov rax, qword [rsp + 0x28]
add rsp, 0x60
pop rdi
ret