Function at 0x140165cd0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push r13
sub rsp, 0x30
mov rdi, r8
mov rbp, rdx
call fcn.1401a0ec0
mov r13, rax
test rax, rax
jne 0x140165cf9
lea eax, [r13 + 1]
add rsp, 0x30
pop r13
pop rdi
pop rbp
ret
lea rdx, [0x140326fec]
mov rcx, rdi
mov qword [rsp + 0x58], rsi
call sub.MSVCR90.dll_fopen
mov rsi, rax
test rax, rax
jne 0x140165d26
lea eax, [rsi + 1]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop r13
pop rdi
pop rbp
ret
mov edx, 1
lea rcx, [rsp + 0x24]
mov r9, rax
lea r8d, [rdx + 3]
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x24], 0x6c7c714c
mov qword [rsp + 0x60], r12
call sub.MSVCR90.dll_fwrite
mov edx, 0x114
mov ebx, 2
mov word [rsp + 0x68], dx
lea rcx, [rsp + 0x68]
lea edx, [rbx - 1]
mov r9, rsi
mov r8, rbx
call sub.MSVCR90.dll_fwrite
lea rcx, [r13 + 0x10]
lea edx, [rbx - 1]
lea r8d, [rbx + 0x1e]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xc]
lea edx, [rbx - 1]
lea r8d, [rbx + 2]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x10]
lea edx, [rbx - 1]
lea r8d, [rbx + 2]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rdi, [rbp + 0x14]
mov r12, rbx
mov edx, 1
mov r9, rsi
mov rcx, rdi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
add rdi, 4
sub r12, 1
jne 0x140165db0
lea rcx, [rbp + 0x1c]
lea edx, [r12 + 1]
lea r8d, [r12 + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rdi, [rbp + 0x20]
mov r12, rbx
nop dword [rax + rax]
mov edx, 1
mov r9, rsi
mov rcx, rdi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
add rdi, 4
sub r12, 1
jne 0x140165df0
lea rdi, [rbp + 0x28]
mov r12, rbx
nop word [rax + rax]
mov edx, 1
mov r9, rsi
mov rcx, rdi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
add rdi, 4
sub r12, 1
jne 0x140165e20
mov r12, qword [rsp + 0x60]
lea rdi, [rbp + 0x30]
nop word [rax + rax]
mov edx, 1
mov r9, rsi
mov rcx, rdi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
add rdi, 4
sub rbx, 1
jne 0x140165e50
lea rcx, [rbp + 4]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 8]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
xor edi, edi
cmp dword [r13 + 0x2413c], edi
jle 0x140165ec4
nop
movsxd rax, edi
mov edx, 1
mov r9, rsi
lea rcx, [rbp + rax*4 + 0x38]
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
inc edi
cmp edi, dword [r13 + 0x2413c]
jl 0x140165ea0
mov edx, 1
lea rcx, [rbp + 0x60]
mov r9, rsi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rbp + 0x64]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rbp + 0x68]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rbp + 0x6c]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rbp + 0x70]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rdi, [rbp + 0x74]
mov ebx, 4
nop word [rax + rax]
mov edx, 1
mov r9, rsi
mov rcx, rdi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
add rdi, 4
sub rbx, 1
jne 0x140165f40
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
mov rcx, rbp
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x84]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x88]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x8c]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x90]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x94]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x98]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x9c]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xa0]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xa4]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xa8]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xac]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xb0]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xb4]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xb8]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xbc]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xc0]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xc4]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0xc8]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp + 0xcc]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
repne scasb al, byte [rdi]
mov r9, rsi
not rcx
dec rcx
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x20]
call sub.MSVCR90.dll_fwrite
movsxd r8, dword [rsp + 0x20]
lea edx, [rbx + 1]
lea rcx, [rbp + 0xcc]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
lea rcx, [rbp + 0x2c0]
lea edx, [rbx + 1]
lea r8d, [rbx + 4]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov rcx, rsi
call sub.MSVCR90.dll_fclose
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x30
pop r13
pop rdi
pop rbp
ret