Function at 0x40ea50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4690f8
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x47d1a0]
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xa0], ecx
call fcn.00402bc0
mov dword [ebp - 0x44], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.00402ce0
add esp, 8
movzx edx, al
test edx, edx
je 0x40eab9
lea eax, [ebp + 8]
push eax
call fcn.00402b30
add esp, 4
jmp 0x40ed94
mov ecx, dword [ebp - 0xa0]
call fcn.00402cd0
test eax, eax
je 0x40eb0c
mov ecx, dword [ebp - 0xa0]
call fcn.00402cd0
mov esi, eax
mov ecx, dword [ebp - 0xa0]
call fcn.004011f0
cmp esi, eax
jae 0x40eb0c
lea ecx, [ebp + 8]
push ecx
call fcn.00402c10
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0xa0]
call fcn.00402b20
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x40ed94
mov edx, dword [ebp - 0xa0]
cmp dword [edx + 0x4c], 0
jne 0x40eb27
call fcn.00402bc0
jmp 0x40ed94
mov eax, dword [ebp - 0xa0]
cmp dword [eax + 0x3c], 0
jne 0x40eb82
mov ecx, dword [ebp - 0xa0]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.00402c10
add esp, 4
movzx ecx, al
push ecx
call fcn.0040e7c0
add esp, 8
movzx edx, al
test edx, edx
je 0x40eb67
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa4], eax
jmp 0x40eb72
call fcn.00402bc0
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa4]
jmp 0x40ed94
mov dword [ebp - 0x10], 8
lea ecx, [ebp + 8]
push ecx
call fcn.00402c10
add esp, 4
mov byte [ebp - 0x15], al
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.0040d0b0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x1c]
push edx
lea ebx, [ebp - 0x4c]
lea edi, [ebp - 0x3c]
call fcn.00405d30
mov ecx, eax
call fcn.0040d5a0
mov esi, eax
lea ecx, [ebp - 0x3c]
call fcn.00403200
add esi, eax
push esi
lea ebx, [ebp - 0x54]
lea edi, [ebp - 0x3c]
call fcn.00405d30
mov ecx, eax
call fcn.0040d5a0
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x15]
push edx
mov eax, dword [ebp - 0xa0]
add eax, 0x44
push eax
mov ecx, dword [ebp - 0xa0]
mov ecx, dword [ecx + 0x3c]
call fcn.0040f8a0
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
jl 0x40ed64
cmp dword [ebp - 0xa8], 1
jle 0x40ec33
cmp dword [ebp - 0xa8], 3
je 0x40ed13
jmp 0x40ed64
lea ebx, [ebp - 0x5c]
lea edi, [ebp - 0x3c]
call fcn.00405d30
mov ecx, eax
call fcn.0040d5a0
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov dword [ebp - 0x40], edx
je 0x40ec9e
mov eax, dword [ebp - 0xa0]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x40]
push edx
push 1
lea ebx, [ebp - 0x64]
lea edi, [ebp - 0x3c]
call fcn.00405d30
mov ecx, eax
call fcn.0040d5a0
push eax
call fcn.00416b3c
add esp, 0x10
cmp dword [ebp - 0x40], eax
je 0x40ec9e
call fcn.00402bc0
mov dword [ebp - 0x68], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004037d0
mov eax, dword [ebp - 0x68]
jmp 0x40ed94
mov eax, dword [ebp - 0xa0]
mov byte [eax + 0x41], 1
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x15]
cmp ecx, edx
je 0x40eccf
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004037d0
mov eax, dword [ebp - 0x6c]
jmp 0x40ed94
cmp dword [ebp - 0x40], 0
jbe 0x40ecd7
jmp 0x40ed11
lea ecx, [ebp - 0x3c]
call fcn.00403200
cmp eax, 0x20
jae 0x40ecf2
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.00403150
jmp 0x40ed11
call fcn.00402bc0
mov dword [ebp - 0x70], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004037d0
mov eax, dword [ebp - 0x70]
jmp 0x40ed94
jmp 0x40ed80
mov ecx, dword [ebp - 0xa0]
mov edx, dword [ecx + 0x4c]
push edx
movzx eax, byte [ebp - 0x15]
push eax
call fcn.0040e7c0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x40ed3c
mov edx, dword [ebp + 8]
mov dword [ebp - 0xac], edx
jmp 0x40ed47
call fcn.00402bc0
mov dword [ebp - 0xac], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004037d0
mov eax, dword [ebp - 0x74]
jmp 0x40ed94
call fcn.00402bc0
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004037d0
mov eax, dword [ebp - 0x78]
jmp 0x40ed94
jmp 0x40ebab
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0041233e
mov esp, ebp
pop ebp
ret 4