Function at 0x40ff5d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
mov eax, dword [0x46c004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x46ca34]
push ebx
push esi
mov esi, 0x4663e4
push edi
cmp eax, 0x80000002
je 0x40ff89
mov esi, 0x4663f8
xor edx, edx
lea ecx, [ebp - 0x610]
push edx
push ecx
push edx
push 4
push edx
push edx
push edx
push 0x46ca00
push eax
call dword [0x45b014]
mov edi, dword [0x45b284]
mov ebx, dword [0x45b268]
test eax, eax
je 0x40ffe0
cmp eax, 5
jne 0x40ffcf
push 0x10
push 0
push 0x466410
call ebx
push eax
call edi
xor eax, eax
jmp 0x4102d8
push 0
push 0x46646c
push 0x46ca00
call ebx
push eax
call edi
push 0x46e960
push 0x46e9e0
lea eax, [ebp - 0x10c]
push 0x466480
push eax
call fcn.0040e1c7
lea eax, [ebp - 0x10c]
push 0x466494
push eax
call fcn.0041ca34
add esp, 0x18
mov dword [0x46e9cc], eax
test eax, eax
jne 0x410055
call fcn.0042fcb7
push dword [eax]
call fcn.0043fd01
push eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x60c]
push 0x466498
push eax
call fcn.0040e1c7
add esp, 0x14
lea eax, [ebp - 0x60c]
push 0x10
push 0
push eax
call ebx
push eax
call edi
jmp 0x40ffc8
lea eax, [ebp - 0x620]
push eax
call fcn.00431dd2
lea eax, [ebp - 0x620]
push eax
call fcn.004323d2
lea eax, [ebp - 0x620]
push eax
call fcn.004323d2
push eax
push 0x4664e0
lea eax, [ebp - 0x10c]
push 0x105
push eax
call fcn.0041db1f
lea eax, [ebp - 0x10c]
push eax
push dword [0x46e9cc]
call fcn.0040e15b
push 0x46eb00
push 0x466510
push dword [0x46e9cc]
call fcn.0040e15b
push esi
push 0x46651c
push dword [0x46e9cc]
call fcn.0040e15b
push dword [0x46e9b8]
lea eax, [ebp - 0x20c]
push dword [0x46e8d0]
push 0x46e960
push 0x466530
push eax
call fcn.0040e1c7
add esp, 0x50
lea eax, [ebp - 0x618]
xor esi, esi
push eax
lea eax, [ebp - 0x614]
push eax
push esi
push 0x20006
push esi
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x610]
call dword [0x45b014]
test eax, eax
je 0x41012f
push esi
push 0x46653c
lea eax, [ebp - 0x20c]
push eax
call ebx
push eax
call edi
push dword [ebp - 0x610]
call dword [0x45b008]
cmp dword [ebp - 0x618], 1
jne 0x410163
lea eax, [ebp - 0x20c]
push eax
push 0x46ca00
push 0x466554
push dword [0x46e9cc]
call fcn.0040e15b
add esp, 0x10
push 0x46e900
push dword [0x46e9b8]
lea eax, [ebp - 0x10c]
push dword [0x46e8d0]
push 0x46656c
push eax
call fcn.0040e1c7
lea ecx, [ebp - 0x10c]
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410191
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push esi
push 0x46657c
push dword [ebp - 0x614]
call dword [0x45b01c]
test eax, eax
je 0x4101cf
push esi
push 0x466588
lea eax, [ebp - 0x10c]
push eax
call ebx
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
push 0x46657c
lea eax, [ebp - 0x20c]
push eax
push 0x46ca00
push 0x4665a0
push dword [0x46e9cc]
call fcn.0040e15b
push 0x46e960
push 0x46e9e0
lea eax, [ebp - 0x10c]
push 0x4665c0
push eax
call fcn.0040e1c7
lea eax, [ebp - 0x10c]
push 0x4665d0
push eax
call fcn.0041ca34
mov esi, eax
push esi
push 1
push dword [0x46e6a4]
push dword [0x46e954]
call fcn.0042fbe6
add esp, 0x40
push esi
call fcn.0041cd2f
mov eax, 0x46e960
mov ecx, 0x46e9e0
push eax
push ecx
push eax
push ecx
lea eax, [ebp - 0x10c]
push 0x4665d4
push eax
call fcn.0040e1c7
lea ecx, [ebp - 0x10c]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41026d
sub ecx, edx
mov esi, 0x466600
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push 0
push esi
push dword [ebp - 0x614]
call dword [0x45b01c]
test eax, eax
je 0x4102ae
push 0
push 0x466588
lea eax, [ebp - 0x10c]
push eax
call ebx
push eax
call edi
lea ecx, [ebp - 0x10c]
push ecx
push esi
lea ecx, [ebp - 0x20c]
push ecx
push 0x46ca00
push 0x4665a0
push dword [0x46e9cc]
call fcn.0040e15b
xor eax, eax
add esp, 0x18
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414523
mov esp, ebp
pop ebp
ret