Function at 0x40f830
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x558
mov eax, dword [0x528ab0]
xor eax, esp
mov dword [esp + 0x554], eax
push esi
mov esi, dword [esp + 0x560]
push edi
jmp 0x40f857
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [esp + 8], edi
cmp esi, edi
jne 0x40f87e
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x554]
xor ecx, esp
call fcn.0049e2ba
add esp, 0x558
ret
push 0x1e0
push 0x90
push 0x517796
call fcn.0049e240
mov eax, dword [esi]
mov dword [0x517796], eax
mov ecx, dword [esi + 4]
mov dword [0x51779a], ecx
mov edx, dword [esi + 8]
mov dword [0x51779e], edx
mov eax, dword [esi + 0xc]
add esp, 0xc
lea edx, [esp + 0x390]
mov dword [0x5177a2], eax
mov ecx, dword [esi + 0x10]
push edx
push 0x1cc
mov dword [0x5177a6], ecx
call dword [0x4b72cc]
call dword [0x4b7284]
push eax
lea eax, [esp + 0x394]
push eax
call fcn.0040ec30
lea eax, [esp + 0x398]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f8f3
mov cl, byte [esp + 0x568]
sub eax, edx
lea edx, [esp + 0x390]
push 0x4b7a00
push edx
mov byte [esp + eax + 0x393], cl
call fcn.0049e90a
mov esi, eax
add esp, 8
cmp esi, edi
je 0x40f865
mov eax, dword [0x4c300c]
push esi
push 1
push eax
push 0x517590
call fcn.0049ea83
push esi
call fcn.0049e6ae
add esp, 0x14
lea ecx, [esp + 0x80]
push ecx
call dword [0x4b7288]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x84]
push eax
push edi
push edi
push 3
push edi
push edi
push edi
push edi
lea ecx, [esp + 0x3b4]
push ecx
call dword [0x4b72c8]
test eax, eax
je 0x40f865
push 0xffffffffffffffff
lea edx, [esp + 0x24]
push edx
call dword [0x4b728c]
mov eax, dword [esp + 0x20]
cmp eax, 5
je 0x40faf3
mov esi, dword [0x4b7290]
push ebx
mov ebx, dword [0x4b7294]
push ebp
mov ebp, dword [0x4b7298]
lea esp, [esp]
cmp eax, 1
jne 0x40fac2
mov eax, dword [esp + 0x34]
cmp eax, 0x80000003
jne 0x40fa25
cmp edi, 1
jle 0x40f9ca
inc edi
test edi, edi
jne 0x40f9dd
mov edi, 1
push 0x10002
jmp 0x40fac7
cmp edi, 1
jne 0x40fa1b
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0xcc]
push eax
push ecx
mov dword [esp + 0xd4], 0x10001
call ebx
mov eax, dword [esp + 0x1c]
or dword [esp + 0x18c], 0x100
lea edx, [esp + 0xcc]
push edx
push eax
call ebp
mov edi, 2
push 0x10002
jmp 0x40fac7
cmp eax, 0x80000004
jne 0x40fac2
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0xcc]
push eax
push ecx
call ebx
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40fa54
mov edx, dword [esp + 0x184]
mov dword [esp + 0x10], edx
jmp 0x40fa66
cmp dword [esp + 0x184], eax
jae 0x40fa66
mov eax, dword [esp + 0x18]
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [esp + 0x184]
sub eax, dword [esp + 0x10]
cmp eax, 0x14
jbe 0x40fa7f
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push ecx
jmp 0x40fa90
cmp eax, 4
jbe 0x40fa92
mov edx, dword [esp + 0x18]
push 0xffffffffffffffff
inc edi
mov dword [esp + 0x18], eax
push edx
call esi
cmp edi, 2
jg 0x40faa2
or dword [esp + 0x18c], 0x100
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0xcc]
push eax
push ecx
call ebp
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push 0x10002
push edx
push eax
jmp 0x40fad1
push 0x80010001
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
push ecx
push edx
call dword [0x4b729c]
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push eax
call dword [0x4b728c]
mov eax, dword [esp + 0x28]
cmp eax, 5
jne 0x40f9b0
pop ebp
pop ebx
jmp 0x410031
jmp 0x41003b
mov ecx, dword [esp + 0x55c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
xor ecx, esp
call fcn.0049e2ba
add esp, 0x558
ret