Function at 0x1400035f0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x210
mov rax, qword [0x140009110]
xor rax, rsp
mov qword [rsp + 0x200], rax
mov rdi, rcx
mov rbp, rdx
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x188
mov rsi, r9
call sub.msvcrt.dll_memset
mov rax, qword [rsp + 0x260]
mov r10, qword [rsp + 0x268]
xor r12d, r12d
mov r9, rsi
lea rcx, [rax + 4]
lea r13d, [r12 + 1]
sub r9, rax
mov dword [rsp + 0x54], r12d
lea r8, [rsp + 0xa4]
sub r10, rax
mov edx, r13d
cmp edx, 2
ja 0x140003692
mov eax, dword [r9 + rcx]
mov dword [r8 - 8], eax
mov eax, dword [rcx]
mov dword [r8], eax
cmp dword [r10 + rcx], r12d
je 0x140003682
add dword [rsp + 0x54], r13d
add edx, r13d
add rcx, 4
add r8, 4
cmp edx, 3
jb 0x140003665
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.14000331c
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
mov rcx, qword [rdi]
cmp rcx, r12
je 0x1400036c9
mov edx, dword [rdi + 8]
xor r8d, r8d
call qword [sym.imp.msvcrt.dll_fseek]
cmp eax, r12d
mov eax, 0x80004005
cmovne ebx, eax
cmp ebx, r12d
mov byte [rdi + 0xc], r12b
mov dword [rdi + 0x18], r12d
jl 0x140003b35
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.140004498
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
mov edx, dword [rsp + 0x58]
mov r8, qword [rsp + 0x1c0]
cmp edx, r12d
je 0x14000371d
mov ecx, r12d
mov eax, dword [r8 + 4]
add ecx, r13d
add r8, 0x58
and eax, 2
cmp eax, r12d
je 0x140003706
sub edx, ecx
jne 0x140003703
lea rcx, [rsp + 0x40]
mov edx, 5
call fcn.140007474
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
lea rcx, [rsp + 0x40]
call fcn.1400047f8
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
cmp dword [rsi], r12d
je 0x14000379b
mov r10d, r12d
mov ebx, 0x10000
lea r11, [rsp + 0x9c]
cmp dword [r11], r12d
je 0x140003778
lea rcx, [rsp + 0x40]
mov r9d, r10d
mov r8d, ebx
xor edx, edx
call fcn.140006c6c
add r10d, r13d
add ebx, ebx
add r11, 4
cmp r10d, 2
jl 0x140003761
lea rcx, [rsp + 0x40]
xor edx, edx
call fcn.140006be4
mov dword [rsp + 0x74], r12d
mov ebx, r12d
cmp ebx, r12d
jl 0x140003b35
lea rcx, [rsp + 0x40]
call fcn.140006558
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
mov ebx, dword [rsp + 0x58]
cmp ebx, 0xaaaaaaa
ja 0x1400037d8
mov rcx, rbx
mov edx, 0xc
call qword [sym.imp.msvcrt.dll_calloc]
mov r11, rax
jmp 0x1400037db
mov r11, r12
cmp r11, r12
jne 0x1400037ea
mov ebx, 0x8007000e
jmp 0x140003b35
mov edi, 0x80
cmp ebx, r12d
jbe 0x14000382c
mov rdx, qword [rsp + 0x1c0]
mov r8, rbx
add rdx, 4
test byte [rdx], dil
je 0x140003813
mov eax, dword [rdx + 0xc]
lea rcx, [rax + rax*2]
add dword [r11 + rcx*4], r13d
test byte [rdx], 0x20
je 0x140003823
mov eax, dword [rdx + 0x10]
lea rcx, [rax + rax*2]
add dword [r11 + rcx*4], r13d
add rdx, 0x58
sub r8, r13
jne 0x140003803
mov dword [rsp + 0x90], r12d
cmp ebx, r12d
jbe 0x140003883
mov r8, qword [rsp + 0x1c0]
mov r9, rbx
add r8, 4
mov edx, dword [r8]
test dil, dl
je 0x14000387a
mov eax, dword [r8 + 0xc]
lea rcx, [rax + rax*2]
cmp dword [r11 + rcx*4], 3
ja 0x14000387a
btr edx, 7
bts edx, 8
mov dword [r8], edx
sub dword [rsp + 0x8c], r13d
add dword [rsp + 0x90], r13d
add r8, 0x58
sub r9, r13
jne 0x140003848
mov rcx, r11
call qword [sym.imp.msvcrt.dll_free]
mov edx, dword [rsp + 0x58]
mov r11d, r12d
cmp edx, r12d
jle 0x1400038e4
mov rcx, qword [rsp + 0x1c0]
add rcx, 4
mov r8d, dword [rcx]
mov eax, r8d
and eax, 0x1d0
cmp eax, 0x10
jne 0x1400038d8
lea eax, [r11 + 1]
cmp dword [rcx + 0xc], eax
jne 0x1400038d8
or r8d, 0x40
mov dword [rcx], r8d
sub dword [rsp + 0x88], r13d
add dword [rsp + 0x84], r13d
mov edx, dword [rsp + 0x58]
add r11d, r13d
add rcx, 0x58
cmp r11d, edx
jl 0x1400038a4
cmp edx, 0x2aaaaaa
ja 0x140003903
mov ecx, edx
mov edx, 0x30
call qword [sym.imp.msvcrt.dll_calloc]
mov qword [rsp + 0xb0], rax
jmp 0x14000390b
mov qword [rsp + 0xb0], r12
cmp qword [rsp + 0xb0], r12
je 0x1400037e0
lea rcx, [rsp + 0x40]
call fcn.140004d48
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
mov edx, dword [rsp + 0x58]
or ebx, 0xffffffff
mov dword [rsp + 0x1b0], r12d
cmp edx, r12d
je 0x140003a47
mov rcx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x1c0]
add rcx, 0x10
add rax, 4
add edx, ebx
bt dword [rax], 8
jae 0x140003974
mov dword [rcx], 3
add dword [rsp + 0x1b0], 3
add rax, 0x58
add rcx, 0x30
cmp edx, r12d
jne 0x14000395e
mov edx, dword [rsp + 0x58]
cmp edx, r12d
je 0x140003a47
mov rax, qword [rsp + 0x1c0]
mov rcx, qword [rsp + 0xb0]
lea r10, [rsp + 0x84]
add rcx, 4
mov r11d, 0x4000
lea r8, [rax + 4]
sub r10, rax
add edx, ebx
bt dword [r8], 0xa
jae 0x1400039d8
cmp dword [r8 + 8], edi
jae 0x1400039cb
mov dword [rcx], r13d
jmp 0x1400039db
cmp dword [r8 + 8], r11d
sbb eax, eax
add eax, 3
mov dword [rcx], eax
jmp 0x1400039db
mov dword [rcx], r12d
test byte [r8], 4
je 0x140003a29
cmp dword [r8 + 4], edi
jae 0x1400039ec
add dword [rcx], r13d
jmp 0x1400039fa
cmp dword [r8 + 4], r11d
jae 0x1400039f7
add dword [rcx], 2
jmp 0x1400039fa
add dword [rcx], 3
lea rax, [r8 + 0x14]
mov r9d, 2
cmp dword [r10 + rax], r12d
je 0x140003a20
cmp dword [rax], edi
jae 0x140003a13
add dword [rcx], r13d
jmp 0x140003a20
cmp dword [rax], r11d
jae 0x140003a1d
add dword [rcx], 2
jmp 0x140003a20
add dword [rcx], 3
add rax, 4
sub r9, r13
jne 0x140003a04
mov eax, dword [rcx]
add r8, 0x58
sub r10, 0x58
add dword [rsp + 0x1b4], eax
add rcx, 0x30
cmp edx, r12d
jne 0x1400039b7
lea rcx, [rsp + 0x40]
call fcn.14000674c
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
lea rcx, [rsp + 0x40]
call fcn.14000508c
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
lea rcx, [rsp + 0x40]
call fcn.140005ef0
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
lea rcx, [rsp + 0x40]
call fcn.140005474
cmp eax, r12d
mov ebx, eax
jl 0x140003b35
xor edx, edx
lea rcx, [rsp + 0x1d1]
mov byte [rsp + 0x1d0], r12b
lea r8d, [rdx + 0x2b]
call sub.msvcrt.dll_memset
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x1b8]
mov edi, 0x80004005
mov r8d, 4
mov rcx, rbp
mov ebx, edi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r12d
je 0x140003b35
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x1d0]
mov r8d, 0x2c
mov rcx, rbp
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r12d
je 0x140003b35
mov r8d, dword [rsp + 0x1b8]
mov rdx, qword [rsp + 0x1c0]
lea r9, [rsp + 0x30]
mov rcx, rbp
mov ebx, r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r12d
cmove ebx, edi
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0xf0]
call qword [sym.imp.msvcrt.dll_free]
cmp dword [rsp + 0x178], r12d
je 0x140003bd9
mov rcx, qword [rsp + 0x180]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x188]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x190]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x198]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x1a8]
call qword [sym.imp.msvcrt.dll_free]
cmp dword [rsp + 0xf8], r12d
je 0x140003c29
mov rcx, qword [rsp + 0x100]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x108]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x118]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x128]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x148]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x150]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x158]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x1c0]
call qword [sym.imp.msvcrt.dll_free]
mov eax, ebx
mov rcx, qword [rsp + 0x200]
xor rcx, rsp
call fcn.140007e60
mov rbx, qword [rsp + 0x250]
add rsp, 0x210
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret