Function at 0x405820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430252
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
push esi
push edi
push ecx
lea edi, [ebp - 0xbc]
mov ecx, 0x2c
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x94], 0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
je 0x405875
mov ecx, dword [ebp - 0x10]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x405881
mov al, 1
jmp 0x405b47
mov dword [ebp - 0x14], 8
call fcn.00401a90
mov esi, esp
push eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x10]
mov eax, dword [edx + 0xc]
call eax
cmp esi, esp
call fcn.0040abe0
mov dword [ebp - 0x50], eax
call fcn.00401a90
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x54]
push edx
call fcn.00401a70
add esp, 8
movzx eax, al
test eax, eax
je 0x4058cd
xor al, al
jmp 0x405b47
push 0
push 8
lea ecx, [ebp - 0x44]
call fcn.00403d90
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x64]
push edx
lea ecx, [ebp - 0x44]
call fcn.00403ff0
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x9c], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x9c]
call fcn.00405ff0
mov esi, eax
lea ecx, [ebp - 0x44]
call fcn.00404da0
add esi, eax
push esi
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00403ff0
mov dword [ebp - 0xa0], eax
mov edx, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xa4]
call fcn.00405ff0
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x4c
push eax
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x44]
call fcn.004069a0
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x70]
call fcn.00403b10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.00403b10
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0xa8], edx
cmp dword [ebp - 0xa8], 0
je 0x4059a6
cmp dword [ebp - 0xa8], 1
je 0x4059ad
cmp dword [ebp - 0xa8], 3
je 0x405af7
jmp 0x405b15
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x49], 0
lea ecx, [ebp - 0x7c]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00403ff0
mov dword [ebp - 0xac], eax
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0xb0], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xb0]
call fcn.00405ff0
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov dword [ebp - 0x4c], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x7c]
call fcn.00403b10
cmp dword [ebp - 0x4c], 0
jbe 0x405a5a
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x4c]
push ecx
push 1
lea edx, [ebp - 0x8c]
push edx
lea ecx, [ebp - 0x44]
call fcn.00403ff0
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x94]
or ecx, 1
mov dword [ebp - 0x94], ecx
mov ecx, dword [ebp - 0xb8]
call fcn.00405ff0
push eax
call fcn.0040aeb0
add esp, 0x10
cmp dword [ebp - 0x4c], eax
je 0x405a5a
mov dword [ebp - 0xbc], 1
jmp 0x405a64
mov dword [ebp - 0xbc], 0
mov dl, byte [ebp - 0xbc]
mov byte [ebp - 0x7d], dl
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x94]
and eax, 1
je 0x405a91
and dword [ebp - 0x94], 0xfffffffe
lea ecx, [ebp - 0x8c]
call fcn.00403b10
movzx ecx, byte [ebp - 0x7d]
test ecx, ecx
je 0x405aba
mov byte [ebp - 0x8d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401820
mov al, byte [ebp - 0x8d]
jmp 0x405b47
mov edx, dword [ebp - 0x10]
movzx eax, byte [edx + 0x49]
test eax, eax
jne 0x405ae3
mov byte [ebp - 0x8e], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401820
mov al, byte [ebp - 0x8e]
jmp 0x405b47
cmp dword [ebp - 0x4c], 0
jne 0x405af5
push 0
push 8
lea ecx, [ebp - 0x44]
call fcn.00403e20
jmp 0x405b33
mov byte [ebp - 0x8f], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401820
mov al, byte [ebp - 0x8f]
jmp 0x405b47
mov byte [ebp - 0x90], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401820
mov al, byte [ebp - 0x90]
jmp 0x405b47
jmp 0x4058e0
push edx
mov ecx, ebp
push eax
lea edx, [0x405b78]
call fcn.0040ac10
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xbc
cmp ebp, esp
call fcn.0040abe0
mov esp, ebp
pop ebp
ret