Function at 0x140198130
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r10, qword [0x1403d91d0]
xor r15d, r15d
mov rbp, rdx
mov r14, r8
mov ebx, r9d
mov r13, rdx
imul rbp, r8
mov r12, rcx
mov edi, r15d
mov r8, rbp
cmp r9d, 1
jne 0x14019819d
mov rax, qword [0x1403d9148]
mov qword [0x1403d91f0], r15
mov qword [0x1403d91c8], r10
mov qword [0x1403d91c0], rax
mov eax, dword [0x1403d918c]
mov dword [0x1403d9188], eax
mov rax, qword [0x1403d91e0]
test rax, rax
je 0x1401981c6
sub rax, r10
cmp rbp, rax
jbe 0x1401981c6
cmp ebx, 3
je 0x1401981c3
cmp ebx, 1
je 0x1401981c3
mov r8, rax
cmp ebx, 2
jne 0x1401981f5
mov r8, r15
cmp ebx, 2
jne 0x1401981f5
cmp dword [0x1403c09cc], 0xffffffff
jne 0x1401981e7
mov eax, dword [0x1403d918c]
mov qword [0x1403d9190], r10
mov dword [0x1403c09cc], eax
inc qword [0x1403d9198]
inc qword [0x1403d91a0]
test r8, r8
je 0x14019822e
mov r9, qword [0x1403d9148]
call qword [sym.imp.MSVCR100.dll_fwrite]
mov r10, qword [0x1403d91d0]
mov rsi, rbp
add r10, rax
sub rsi, rax
mov rdi, rax
mov qword [0x1403d91d0], r10
test ebx, ebx
jne 0x140198231
add qword [0x1403d91f0], rax
jmp 0x140198231
mov rsi, rbp
test rsi, rsi
je 0x1401984e5
mov eax, dword [0x1403d91d8]
test eax, eax
je 0x1401984c3
add qword [0x1403d91e8], r10
cmp eax, 1
jne 0x140198276
mov rcx, qword [0x1403d9148]
call qword [sym.imp.MSVCR100.dll_ferror]
test eax, eax
je 0x140198276
lea rdx, str.Could_not_write_split
mov ecx, 0xe
call fcn.14018f470
cmp dword [0x1403d91d8], 2
jne 0x1401982ae
mov rcx, qword [0x1403d9148]
call qword [sym.imp.MSVCR100.dll_ferror]
test eax, eax
je 0x1401982ae
cmp qword [0x1403d91d0], 0x10000
jae 0x1401982ae
lea rdx, str.Not_enough_space_to_write_split
mov ecx, 0xe
call fcn.14018f470
cmp dword [0x1403d91d8], 1
jne 0x1401982d5
mov eax, dword [0x1403d918c]
cmp dword [0x1403d9188], eax
jne 0x1401982d5
mov rax, qword [0x1403d9140]
mov qword [0x1403d91b8], rax
jmp 0x140198309
mov r8, qword [0x1403d9140]
mov rdx, qword [0x1403d9148]
mov ecx, dword [0x1403d918c]
call fcn.1401980c0
mov rcx, qword [0x1403d9140]
mov qword [0x1403d9148], r15
call qword [sym.imp.MSVCR100.dll_free]
mov qword [0x1403d9140], r15
inc dword [0x1403d918c]
cmp dword [0x1403d91d8], 2
mov qword [0x1403d9198], r15
mov qword [0x1403d91d0], r15
jne 0x140198377
cmp dword [0x1403d91dc], r15d
je 0x140198350
mov rdx, qword [0x140407720]
mov ecx, 7
call qword [sym.imp.MSVCR100.dll_putc]
mov rcx, qword [0x140407720]
call qword [sym.imp.MSVCR100.dll_fflush]
nop
cmp dword [0x1403d91d8], 2
jne 0x140198377
mov ecx, dword [0x1403d918c]
call fcn.140197a30
test eax, eax
jne 0x140198377
lea rdx, str.could_not_write_split
lea ecx, [rax + 9]
call fcn.14018f470
mov rcx, qword [0x140407738]
call fcn.140197840
mov qword [0x1403d9140], rax
test rax, rax
jne 0x1401983a5
lea rdx, str.allocating_temp_filename
lea ecx, [rax + 4]
call fcn.14018f470
mov rax, qword [0x1403d9140]
lea rdx, [0x14030bdfc]
mov rcx, rax
call qword [sym.imp.MSVCR100.dll_fopen]
mov qword [0x1403d9148], rax
test rax, rax
jne 0x1401983d7
mov rdx, qword [0x1403d9140]
lea ecx, [rax + 0xa]
call fcn.14018f470
mov rax, qword [0x1403d9148]
lea rcx, [rdi + r12]
mov r9, rax
mov r8, rsi
mov edx, 1
call qword [sym.imp.MSVCR100.dll_fwrite]
add qword [0x1403d91d0], rax
add rdi, rax
cmp ebx, 3
je 0x14019840c
cmp ebx, 1
je 0x14019840c
cmp ebx, 2
je 0x14019840c
add qword [0x1403d91f0], rax
cmp rsi, rax
jbe 0x140198443
cmp dword [0x1403d91d8], 2
jne 0x140198432
lea rdx, [0x140323a58]
lea rcx, str.Not_enough_room_on_disk
call fcn.14018f880
jmp 0x140198350
lea rdx, str.Not_enough_room_on_disk
mov ecx, 0xe
call fcn.14018f470
cmp ebx, 1
je 0x140198456
cmp ebx, 3
je 0x140198456
cmp ebx, 2
jne 0x1401984e5
cmp dword [0x1403d91d8], 1
jne 0x140198492
mov rdx, qword [0x1403d91c0]
test rdx, rdx
je 0x140198492
mov ecx, dword [0x1403d9188]
cmp ecx, dword [0x1403d918c]
je 0x140198492
mov r8, qword [0x1403d91b8]
call fcn.1401980c0
mov rcx, qword [0x1403d91b8]
call qword [sym.imp.MSVCR100.dll_free]
mov rax, qword [0x1403d9140]
mov qword [0x1403d91c8], r15
mov qword [0x1403d91b8], rax
mov rax, qword [0x1403d9148]
mov qword [0x1403d91c0], rax
mov eax, dword [0x1403d918c]
mov dword [0x1403d9188], eax
jmp 0x1401984e5
mov rcx, qword [0x1403d9148]
call qword [sym.imp.MSVCR100.dll_ferror]
test eax, eax
je 0x1401984e5
lea rdx, str.write_error_on_zip_file
mov ecx, 0xe
call fcn.14018f470
cmp dword [0x1403d9078], r15d
je 0x14019859c
mov rdx, qword [0x1403d9060]
mov rcx, qword [0x1403d9068]
test rdx, rdx
jle 0x140198563
cmp rcx, 0xffffffffffffffff
jne 0x14019853b
call qword [sym.imp.MSVCR100.dll___iob_func]
lea rdx, [0x140301e30]
mov r8d, 0x20
lea rcx, [rax + 0x30]
call qword [sym.imp.MSVCR100.dll_fprintf]
mov rdx, qword [0x1403d9060]
mov ecx, 1
mov qword [0x1403d9068], rcx
cmp rbp, 0x3e8
jbe 0x140198560
inc rcx
mov rax, rcx
imul rax, r13
imul rax, r14
cmp rdx, rax
cmovle rcx, r15
mov qword [0x1403d9068], rcx
test rdx, rdx
je 0x14019859c
test rcx, rcx
jne 0x14019859c
mov qword [0x1403d9068], 1
call qword [sym.imp.MSVCR100.dll___iob_func]
lea rdx, [0x140301e30]
lea rcx, [rax + 0x30]
mov r8d, 0x2e
call qword [sym.imp.MSVCR100.dll_fprintf]
mov dword [0x1403d91fc], 1
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rax, rdi
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret