Function at 0x435350
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00434590
mov esi, eax
mov ecx, ebp
mov dword [esp + 0x14], esi
call fcn.00434f10
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
jle 0x43538e
mov edx, dword [ebp + 4]
cmp dword [edx], esi
jne 0x435386
mov bl, byte [edx + 8]
test bl, bl
je 0x43544e
inc ecx
add edx, 0xc
cmp ecx, eax
jl 0x435377
lea eax, [eax + eax*2 + 3]
shl eax, 2
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4355bc
mov eax, dword [ebp + 8]
mov edi, ebx
inc eax
lea ecx, [eax + eax*2]
xor eax, eax
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 4]
test eax, eax
je 0x4353f6
mov ecx, dword [ebp + 8]
mov esi, eax
mov edi, ebx
lea ecx, [ecx + ecx*2]
shl ecx, 2
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
push ecx
call fcn.004ad125
mov esi, dword [esp + 0x18]
add esp, 4
mov eax, dword [ebp + 8]
mov dword [ebp + 4], ebx
lea edx, [eax + eax*2]
lea ebx, [ebx + edx*4]
mov dword [ebx], esi
mov byte [ebx + 8], 0
mov eax, dword [ebp + 8]
test eax, eax
jle 0x435439
mov eax, dword [ebp + 0x23c]
test eax, eax
je 0x435439
push 2
push 0
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [ebp + 0x23c]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov dword [ebx + 4], eax
jmp 0x435440
mov dword [ebx + 4], 0x7d0
mov eax, dword [ebp + 8]
mov ecx, ebp
inc eax
mov dword [ebp + 8], eax
call fcn.00434840
mov ecx, ebp
call fcn.00434840
mov eax, dword [ebp + 0x23c]
test eax, eax
je 0x4355bc
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push eax
call edi
mov ecx, dword [ebp + 0x23c]
mov esi, dword [sym.imp.MSVCRT.dll_ftell]
push ecx
call esi
add esp, 0x10
cmp eax, 0x7d0
jge 0x43549c
mov edx, dword [ebp + 0x23c]
push 0
push 0x7d0
push edx
call edi
add esp, 0xc
mov eax, dword [ebp + 0x23c]
push eax
call esi
mov ecx, dword [ebp + 0x23c]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push ecx
push 1
lea edx, [esp + 0x1f]
push 1
push edx
mov byte [esp + 0x27], 0
call esi
mov eax, dword [ebp + 0x23c]
mov edi, dword [esp + 0x30]
push eax
push 1
push 4
push edi
call esi
mov ecx, dword [ebp + 0x23c]
lea edx, [edi + 4]
push ecx
push 1
push 4
push edx
call esi
mov eax, dword [ebp + 0x23c]
lea ecx, [edi + 8]
push eax
push 1
push 4
push ecx
call esi
mov edx, dword [ebp + 0x23c]
add esp, 0x44
lea eax, [edi + 0xc]
push edx
push 1
push 4
push eax
call esi
mov ecx, dword [ebp + 0x23c]
lea edx, [edi + 0x10]
push ecx
push 1
push 4
push edx
call esi
lea ebx, [edi + 0x14]
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 0x24
cmp eax, 0x103
mov dword [esp + 0x14], eax
jbe 0x43553b
mov dword [esp + 0x14], 0x103
mov eax, dword [ebp + 0x23c]
lea ecx, [esp + 0x14]
push eax
push 1
push 4
push ecx
call esi
mov edx, dword [ebp + 0x23c]
mov eax, dword [esp + 0x24]
push edx
push eax
push 2
push ebx
call esi
lea ebx, [edi + 0x21c]
add esp, 0x20
mov ecx, ebx
call fcn.00412310
mov ecx, dword [ebp + 0x23c]
lea edx, [esp + 0x14]
push ecx
push 1
inc eax
push 4
push edx
mov dword [esp + 0x24], eax
call esi
mov eax, dword [ebp + 0x23c]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push eax
push ecx
push 1
mov ecx, ebx
call fcn.00412330
push eax
call esi
mov edx, dword [ebp + 0x23c]
push edx
call dword [sym.imp.MSVCRT.dll_fflush]
mov eax, dword [edi]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 8
ret 4