Function at 0x40e8b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x144]
mov ecx, 0x51
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x47406c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov ecx, 0x477065
call fcn.004140c0
call fcn.0040d200
mov dword [ebp - 0x13c], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x13c]
push ecx
call fcn.0040d2d0
add esp, 8
movzx edx, al
test edx, edx
je 0x40e91d
lea eax, [ebp + 8]
push eax
call fcn.0040e680
add esp, 4
jmp 0x40eabf
mov ecx, dword [ebp - 0xc]
call fcn.0040eda0
test eax, eax
je 0x40e95f
mov ecx, dword [ebp - 0xc]
call fcn.0040eda0
mov esi, eax
mov ecx, dword [ebp - 0xc]
call fcn.0040d270
cmp esi, eax
jae 0x40e95f
lea eax, [ebp + 8]
push eax
call fcn.004100d0
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0xc]
call fcn.0040b090
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x40eabf
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x4c], 0
jne 0x40e972
call fcn.0040d200
jmp 0x40eabf
mov ecx, dword [ebp - 0xc]
call fcn.0040b110
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x38], 0
jne 0x40e9ca
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
lea edx, [ebp + 8]
push edx
call fcn.004100d0
add esp, 4
movzx eax, al
push eax
call fcn.004028e0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x40e9b4
mov edx, dword [ebp + 8]
mov dword [ebp - 0x144], edx
jmp 0x40e9bf
call fcn.0040d200
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
jmp 0x40eabf
mov dword [ebp - 0x18], 0x20
lea eax, [ebp + 8]
push eax
call fcn.004100d0
add esp, 4
mov byte [ebp - 0x49], al
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x40]
push edx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x49]
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x40
push eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
call fcn.0040e830
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 0
jl 0x40eaba
cmp dword [ebp - 0x144], 1
jle 0x40ea34
cmp dword [ebp - 0x144], 3
je 0x40ea81
jmp 0x40eaba
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x40]
sub eax, ecx
mov dword [ebp - 0x70], eax
je 0x40ea66
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x70]
push edx
push 1
lea eax, [ebp - 0x40]
push eax
call fcn.00421550
add esp, 0x10
cmp dword [ebp - 0x70], eax
je 0x40ea66
call fcn.0040d200
jmp 0x40eabf
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x3d], 1
lea eax, [ebp - 0x49]
cmp dword [ebp - 0x58], eax
je 0x40ea7a
mov eax, dword [ebp + 8]
jmp 0x40eabf
call fcn.0040d200
jmp 0x40eabf
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, byte [ebp - 0x49]
push edx
call fcn.004028e0
add esp, 8
movzx eax, al
test eax, eax
je 0x40eaa7
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x144], ecx
jmp 0x40eab2
call fcn.0040d200
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
jmp 0x40eabf
call fcn.0040d200
push edx
mov ecx, ebp
push eax
lea edx, [0x40eaf0]
call fcn.00414010
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414190
add esp, 0x144
cmp ebp, esp
call fcn.00414080
mov esp, ebp
pop ebp
ret 4