Function at 0x436e80
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.004360c0
mov esi, eax
mov ecx, ebp
mov dword [esp + 0x14], esi
call fcn.00436a40
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
jle 0x436ebe
mov edx, dword [ebp + 4]
cmp dword [edx], esi
jne 0x436eb6
mov bl, byte [edx + 8]
test bl, bl
je 0x436f7e
inc ecx
add edx, 0xc
cmp ecx, eax
jl 0x436ea7
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 0x4370ec
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 0x436f26
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.004ace19
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 0x436f69
mov eax, dword [ebp + 0x23c]
test eax, eax
je 0x436f69
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 0x436f70
mov dword [ebx + 4], 0x7d0
mov eax, dword [ebp + 8]
mov ecx, ebp
inc eax
mov dword [ebp + 8], eax
call fcn.00436370
mov ecx, ebp
call fcn.00436370
mov eax, dword [ebp + 0x23c]
test eax, eax
je 0x4370ec
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 0x436fcc
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 0x43706b
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.004122a0
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.004db690
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