Function at 0x140013470
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x150
mov qword [r11 - 0x68], 0xfffffffffffffffe
mov rax, qword [0x14005f020]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x108], r8
mov qword [rsp + 0x100], rdx
mov r12, rcx
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x118], rcx
mov rax, qword [rsp + 0x1b8]
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0x1c0]
mov qword [rsp + 0x60], rax
lea rdi, [rcx + 0x10]
mov qword [r11 - 0x78], rdi
mov rax, qword [rdi + 0x28]
mov rcx, rdi
test rax, rax
je 0x1400134fc
call rax
jmp 0x140013503
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
xor r13d, r13d
mov r8d, r13d
mov qword [rsp + 0x98], r13
mov qword [rsp + 0xa0], r13
mov rsi, qword [r12 + 0x48]
mov rax, qword [rsi]
cmp rax, rsi
je 0x140013bf2
nop word [rax + rax]
mov rdx, qword [rax + 0x28]
mov rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp word [rdx + rcx*2], r13w
jne 0x140013540
add rcx, 7
add rcx, qword [rdx + 0x109]
add r8, rcx
mov rcx, qword [rax + 0x10]
cmp byte [rcx + 0x19], r13b
je 0x140013588
mov rcx, qword [rax + 8]
cmp byte [rcx + 0x19], r13b
jne 0x140013583
nop dword [rax]
cmp rax, qword [rcx + 0x10]
jne 0x140013583
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], r13b
je 0x140013570
mov rax, rcx
jmp 0x1400135a0
mov rax, rcx
mov rcx, qword [rcx]
cmp byte [rcx + 0x19], r13b
jne 0x1400135a0
mov rax, rcx
mov rcx, qword [rcx]
cmp byte [rcx + 0x19], r13b
je 0x140013594
cmp rax, rsi
jne 0x140013530
mov qword [rsp + 0xf0], r8
test r8, r8
je 0x140013bf2
xor edx, edx
mov rcx, qword [r12 + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
mov qword [rsp + 0xa8], rax
mov r15, rax
mov rbx, qword [r12 + 0x48]
mov rbx, qword [rbx]
cmp rbx, rsi
je 0x140013671
mov r14, qword [rbx + 0x28]
mov r8, r14
mov rdx, r15
mov rcx, r12
call fcn.140013c90
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [r14 + rax*2], r13w
jne 0x140013600
add rax, 7
add rax, qword [r14 + 0x109]
add r15, rax
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], r13b
je 0x140013648
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], r13b
jne 0x140013643
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x140013643
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r13b
je 0x140013630
mov rbx, rax
jmp 0x140013660
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r13b
jne 0x140013660
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r13b
je 0x140013654
cmp rbx, rsi
jne 0x1400135e2
mov r14, qword [rsp + 0xa8]
mov ecx, 0x158
call fcn.14002fd10
mov rbx, rax
lea rcx, [rax + 8]
xor r8d, r8d
xor edx, edx
call fcn.14002d110
mov eax, 0xfe129987
mov dword [rbx], eax
xor rbx, rax
mov qword [rsp + 0x78], rbx
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0xe0]
mov rcx, rbx
call fcn.1400116c0
mov esi, eax
mov rcx, rbx
test eax, eax
js 0x140013c31
lea rax, [rsp + 0x88]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x80]
mov r8, qword [rsp + 0xf0]
mov rdx, r14
call fcn.140011590
mov ebx, eax
test eax, eax
js 0x140013c5a
mov dword [rsp + 0x128], 0x614e6458
mov rbx, qword [rsp + 0x1b0]
mov rax, rbx
shr rax, 3
mov byte [rsp + 0x134], al
mov rsi, qword [rsp + 0x88]
lea eax, [rbx + rsi]
mov dword [rsp + 0x130], eax
add eax, eax
mov dword [rsp + 0x12c], eax
lea r12, [rsi + rbx]
mov r8, r12
xor edx, edx
mov r14, qword [rsp + 0x90]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x140013b05
mov r8, rbx
mov rdx, qword [rsp + 0x68]
mov rcx, rax
call fcn.1400318c0
lea rcx, [r15 + rbx]
mov r8, rsi
mov rsi, qword [rsp + 0x80]
mov rdx, rsi
call fcn.1400318c0
mov r8d, dword [rsp + 0x12c]
xor edx, edx
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
mov qword [rsp + 0x98], rax
test rax, rax
jne 0x14001380d
test rsi, rsi
je 0x1400137af
mov rcx, rsi
call fcn.140033b48
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x1400137ec
mov ecx, 0xfe129987
xor rbx, rcx
mov eax, 0x80000000
je 0x1400137d1
cmp dword [rbx], ecx
cmovne r13d, eax
mov eax, r13d
test eax, eax
jne 0x1400137ec
lea rcx, [rbx + 8]
call fcn.14002d060
mov edx, 0x158
mov rcx, rbx
call fcn.14002fb54
nop
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x1400137fc
call rax
jmp 0x140013803
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov eax, 0xe0010003
jmp 0x140013c0e
mov qword [rsp + 0x68], 5
mov eax, dword [rsp + 0x12c]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0xd4], r13
mov qword [rsp + 0xcc], 0xffffffffffffffff
mov dword [rsp + 0xc4], 0xffffffff
mov dword [rsp + 0xb0], 5
mov dword [rsp + 0xb4], 0x1000000
mov qword [rsp + 0xb8], 3
mov dword [rsp + 0xc0], 2
mov dword [rsp + 0xc8], 0x20
mov dword [rsp + 0xdc], 1
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x135]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9, r12
mov r8, r15
lea rdx, [rsp + 0x60]
mov rcx, r14
call fcn.140009bf0
test eax, eax
jne 0x1400138c4
mov eax, r13d
jmp 0x1400138c9
or eax, 0xe0020000
test eax, eax
jns 0x140013938
test rsi, rsi
je 0x1400138da
mov rcx, rsi
call fcn.140033b48
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x140013917
mov ecx, 0xfe129987
xor rbx, rcx
mov eax, 0x80000000
je 0x1400138fc
cmp dword [rbx], ecx
cmovne r13d, eax
mov eax, r13d
test eax, eax
jne 0x140013917
lea rcx, [rbx + 8]
call fcn.14002d060
mov edx, 0x158
mov rcx, rbx
call fcn.14002fb54
nop
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x140013927
call rax
jmp 0x14001392e
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov eax, 0xe0010001
jmp 0x140013c0e
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x12c], eax
lea rax, vtable.XFileIO.0
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 0xffffffffffffffff
mov r8d, 1
mov rdx, qword [rsp + 0x100]
lea rcx, [rsp + 0x68]
call fcn.140012040
mov r12d, eax
test eax, eax
jns 0x1400139f2
mov rcx, qword [rsp + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x140013989
call qword [0x1400472c0]
nop
test rsi, rsi
je 0x140013996
mov rcx, rsi
call fcn.140033b48
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x1400139d3
mov ecx, 0xfe129987
xor rbx, rcx
mov eax, 0x80000000
je 0x1400139b8
cmp dword [rbx], ecx
cmovne r13d, eax
mov eax, r13d
test eax, eax
jne 0x1400139d3
lea rcx, [rbx + 8]
call fcn.14002d060
mov edx, 0x158
mov rcx, rbx
call fcn.14002fb54
nop
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x1400139e3
call rax
jmp 0x1400139ea
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov eax, r12d
jmp 0x140013c0e
mov rax, 0xffffffffffffffff
mov rdx, qword [rsp + 0x108]
lea rax, [rax + 1]
cmp byte [rdx + rax], 0
jne 0x140013a01
lea r8, [rax + 1]
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x1e]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x60]
mov r8d, 0x12
lea rdx, [rsp + 0x128]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, dword [rsp + 0x12c]
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x60]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rbx, 0xffffffffffffffff
je 0x140013a9e
mov rcx, rbx
call qword [0x1400472c0]
mov rbx, 0xffffffffffffffff
cmp rbx, 0xffffffffffffffff
je 0x140013aae
mov rcx, rbx
call qword [0x1400472c0]
nop
test rsi, rsi
je 0x140013abb
mov rcx, rsi
call fcn.140033b48
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x140013af8
mov ecx, 0xfe129987
xor rbx, rcx
mov eax, 0x80000000
je 0x140013add
cmp dword [rbx], ecx
cmovne r13d, eax
mov eax, r13d
test eax, eax
jne 0x140013af8
lea rcx, [rbx + 8]
call fcn.14002d060
mov edx, 0x158
mov rcx, rbx
call fcn.14002fb54
nop
mov rbx, qword [rsp + 0x90]
jmp 0x140013b95
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x140013b17
call fcn.140033b48
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x140013b54
mov ecx, 0xfe129987
xor rbx, rcx
mov eax, 0x80000000
je 0x140013b39
cmp dword [rbx], ecx
cmovne r13d, eax
mov eax, r13d
test eax, eax
jne 0x140013b54
lea rcx, [rbx + 8]
call fcn.14002d060
mov edx, 0x158
mov rcx, rbx
call fcn.14002fb54
nop
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x140013b64
call rax
jmp 0x140013b6b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov eax, 0xe0010003
jmp 0x140013c0e
test r14, r14
je 0x140013ba9
mov r8, r14
xor edx, edx
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r15, r15
je 0x140013bbd
mov r8, r15
xor edx, edx
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0xa8]
test r8, r8
je 0x140013bd7
xor edx, edx
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x140013be7
call rax
jmp 0x140013bee
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
xor eax, eax
jmp 0x140013c0e
mov rax, qword [rdi + 0x30]
mov rcx, rdi
test rax, rax
je 0x140013c02
call rax
jmp 0x140013c09
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov eax, 0xe0010002
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.14002fb30
add rsp, 0x150
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call fcn.140010f20
nop
mov edx, esi
lea rcx, [rsp + 0xe8]
call fcn.140011c30
lea rdx, [0x14005df50]
lea rcx, [rsp + 0xe8]
call fcn.140031dd8
mov rcx, qword [rsp + 0x78]
call fcn.140010f20
mov edx, ebx
lea rcx, [rsp + 0xf8]
call fcn.140011c30
lea rdx, [0x14005df50]
lea rcx, [rsp + 0xf8]
call fcn.140031dd8
int3