Function at 0x413a70
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x6c
mov ebp, dword [0x475fb8]
mov eax, dword [esp + 0x84]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x50], edx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x90]
mov edi, dword [esp + 0x88]
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x54], eax
test ebp, ebp
je 0x413b20
mov dword [esp + 0x3c], ecx
call fcn.004294e0
mov ebp, eax
mov eax, 0x35
test ebp, ebp
je 0x413b15
mov eax, dword [esp + 0xac]
mov dword [esp], eax
call sub.cygwin1.dll_strlen
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
mov edx, dword [esp + 0x40]
cmp edx, eax
je 0x413d20
mov dword [esp], ebp
call sub.cygwin1.dll_fclose
mov eax, 0x36
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x58], 0
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x44], edx
and eax, ecx
cmp eax, 0xffffffff
setne al
movzx eax, al
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
test eax, eax
je 0x413b93
cmp byte [0x476089], 0
je 0x413b6a
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
or eax, edx
je 0x413d30
or edi, esi
jne 0x413b93
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov edi, edx
sar edi, 0x1f
mov esi, edi
cmp esi, eax
sbb edi, edx
mov edx, dword [esp + 0x3c]
mov eax, edx
or eax, 2
test edi, edi
cmovns eax, edx
mov dword [esp + 0x3c], eax
mov edi, dword [esp + 0x3c]
mov eax, edi
or eax, 4
cmp byte [esp + 0x54], 0
cmove eax, edi
cmp dword [ebx + 0x68], 1
mov dword [esp + 0x3c], eax
jne 0x413bb3
or dword [esp + 0x3c], 8
mov edx, dword [esp + 0x4c]
lea eax, [ebx + 0x38]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x44]
mov eax, edx
mov dword [ebx], esi
xor esi, esi
and eax, ecx
mov dword [ebx + 4], edi
lea edi, [ebx + 0x40]
not eax
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x44]
test eax, eax
mov dword [ebx + 0x38], 0
cmove ecx, esi
cmovne esi, edx
mov dword [ebx + 0x3c], 0
mov dword [esp + 0x18], edi
mov eax, esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], esi
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x2c], ebp
mov dword [esp], eax
call fcn.00423f40
mov dword [ebx + 0x18], eax
mov edx, eax
test eax, eax
js 0x413cc0
test ebp, ebp
je 0x413d0f
mov eax, dword [ebx + 0x20]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], eax
sar eax, 0x1f
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x94]
mov dword [esp], eax
call fcn.0042a7b0
test al, al
jne 0x413d0f
add esp, 0x6c
mov eax, 0x34
pop ebx
pop esi
pop edi
pop ebp
ret
test ebp, ebp
je 0x413ccf
mov dword [esp], ebp
call sub.cygwin1.dll_fclose
mov edx, dword [ebx + 0x18]
cmp edx, 0xfffffffe
je 0x413d80
mov eax, 0x36
cmp edx, 0xfffffffd
je 0x413b15
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call fcn.004376c0
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x1c], 0
mov dword [esp], eax
call fcn.00401ae0
mov dword [esp], eax
call fcn.00447e10
mov dword [ebx + 0x1c], eax
add esp, 0x6c
mov eax, 0x23
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x58], edx
mov ecx, dword [esp + 0x3c]
jmp 0x413b28
mov eax, dword [esp + 0xac]
mov dword [esp + 0x5c], ecx
mov dword [esp], eax
call sub.cygwin1.dll_strlen
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
jmp 0x413b6a
mov eax, 0x15
jmp 0x413b15