Function at 0x140252410
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0xa0
mov rax, qword [0x140377790]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbp, qword [rsp + 0xf0]
mov ebx, edx
mov dword [rsp + 0x40], edx
lea rdx, [0x140326fec]
mov edi, r9d
movsxd r12, r8d
call sub.MSVCR90.dll_fopen
mov rsi, rax
test rax, rax
jne 0x140252460
lea eax, [rsi + 1]
jmp 0x1402527b0
mov qword [rsp + 0xd8], r13
xor r13d, r13d
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x29], 0
mov byte [rsp + 0x2a], 2
mov word [rsp + 0x36], r12w
mov word [rsp + 0x2c], r13w
mov word [rsp + 0x2e], r13w
mov byte [rsp + 0x30], r13b
mov word [rsp + 0x32], r13w
mov word [rsp + 0x34], r13w
mov word [rsp + 0x38], di
cmp ebx, 0x18
jne 0x1402524b2
mov byte [rsp + 0x3a], bl
mov byte [rsp + 0x3b], r13b
jmp 0x1402524bc
mov byte [rsp + 0x3a], 0x20
mov byte [rsp + 0x3b], 8
mov edx, 1
lea rcx, [rsp + 0x28]
mov r9, rax
mov r8, rdx
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x29]
mov r8, rdx
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x2a]
mov r8, rdx
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x2c]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x2e]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x30]
mov r8, rdx
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x32]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x34]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x36]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x38]
lea r8d, [rdx + 1]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x3a]
mov r8, rdx
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x3b]
mov r8, rdx
mov r9, rsi
call sub.MSVCR90.dll_fwrite
test edi, edi
jle 0x14025272d
mov edx, dword [rsp + 0x100]
lea eax, [rdi - 1]
mov qword [rsp + 0x98], r14
imul eax, r12d
movsxd rcx, eax
mov eax, r12d
neg eax
mov qword [rsp + 0x90], r15
mov r8, r12
cdqe
mov r15, r13
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x50], rax
mov rax, rdi
mov r9, qword [rsp + 0x50]
mov qword [rsp + 0x58], rax
nop dword [rax + rax]
mov ebx, r13d
test r12d, r12d
jle 0x140252703
mov r13d, edx
mov r14d, edx
lea edi, [r12 - 1]
and r13d, 1
and r14d, 2
nop
test r13d, r13d
mov eax, ebx
cmovne eax, edi
test r14d, r14d
je 0x140252649
cdqe
add rax, r15
lea rcx, [rbp + rax*4]
jmp 0x140252653
cdqe
add rax, rcx
lea rcx, [rbp + rax*4]
cmp dword [rsp + 0xf8], 1
mov ecx, dword [rcx]
jne 0x140252679
mov edx, ecx
mov eax, ecx
movzx r8d, cl
shr eax, 8
shr edx, 0x18
shr ecx, 0x10
movzx r9d, al
movzx eax, cl
jmp 0x140252693
mov eax, ecx
mov edx, ecx
shr eax, 0x10
shr edx, 0x18
movzx r8d, al
mov eax, ecx
shr eax, 8
movzx r9d, al
movzx eax, cl
cmp dword [rsp + 0x40], 0x18
mov byte [rsp + 0x20], al
mov byte [rsp + 0x21], r9b
mov byte [rsp + 0x22], r8b
mov byte [rsp + 0x23], dl
jne 0x1402526c4
mov edx, 1
lea rcx, [rsp + 0x20]
mov r9, rsi
lea r8d, [rdx + 2]
call sub.MSVCR90.dll_fwrite
jmp 0x1402526da
mov edx, 1
lea rcx, [rsp + 0x20]
mov r9, rsi
lea r8d, [rdx + 3]
call sub.MSVCR90.dll_fwrite
mov rcx, qword [rsp + 0x48]
inc ebx
dec edi
cmp ebx, r12d
jl 0x140252630
mov rax, qword [rsp + 0x58]
mov edx, dword [rsp + 0x100]
mov r9, qword [rsp + 0x50]
mov r8, r12
xor r13d, r13d
add rcx, r9
add r15, r8
sub rax, 1
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x48], rcx
jne 0x140252610
mov r15, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov rax, qword [str.TRUEVISION_XFILE.]
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x60], r13d
mov dword [rsp + 0x64], r13d
mov qword [rcx], rax
mov rax, qword [0x140313a58]
mov qword [rcx + 8], rax
movzx eax, word [0x140313a60]
mov edx, 1
mov word [rcx + 0x10], ax
lea rcx, [rsp + 0x60]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x64]
lea r8d, [rdx + 3]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov edx, 1
lea rcx, [rsp + 0x68]
lea r8d, [rdx + 0x11]
mov r9, rsi
call sub.MSVCR90.dll_fwrite
mov rcx, rsi
call sub.MSVCR90.dll_fclose
mov r13, qword [rsp + 0xd8]
xor eax, eax
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140291ec0
add rsp, 0xa0
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret