Function at 0x402900
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4300d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xdc
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0xe8]
mov ecx, 0x37
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xb8], 0
call fcn.00401a90
mov dword [ebp - 0x68], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x68]
push ecx
call fcn.00401a70
add esp, 8
movzx edx, al
test edx, edx
je 0x402974
lea eax, [ebp + 8]
push eax
call fcn.00402dd0
add esp, 4
jmp 0x402d52
mov ecx, dword [ebp - 0x10]
call fcn.004052c0
test eax, eax
je 0x4029b8
mov ecx, dword [ebp - 0x10]
call fcn.004052c0
mov esi, eax
mov ecx, dword [ebp - 0x10]
call fcn.00405350
cmp esi, eax
jae 0x4029b8
lea ecx, [ebp + 8]
push ecx
call fcn.00402620
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0x10]
call fcn.004054f0
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x402d52
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x54], 0
jne 0x4029cb
call fcn.00401a90
jmp 0x402d52
mov ecx, dword [ebp - 0x10]
call fcn.00405c40
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
jne 0x402a28
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x54]
push edx
lea eax, [ebp + 8]
push eax
call fcn.00402620
add esp, 4
movzx ecx, al
push ecx
call fcn.00402e20
add esp, 8
movzx edx, al
test edx, edx
je 0x402a0d
mov eax, dword [ebp + 8]
mov dword [ebp - 0xbc], eax
jmp 0x402a18
call fcn.00401a90
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0xbc]
jmp 0x402d52
mov dword [ebp - 0x14], 8
lea ecx, [ebp + 8]
push ecx
call fcn.00402620
add esp, 4
mov byte [ebp - 0x19], al
push 0
push 8
lea ecx, [ebp - 0x5c]
call fcn.00403d90
mov dword [ebp - 4], 0
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00403ff0
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xc4]
call fcn.00405ff0
mov esi, eax
lea ecx, [ebp - 0x5c]
call fcn.00404da0
add esi, eax
push esi
lea edx, [ebp - 0x84]
push edx
lea ecx, [ebp - 0x5c]
call fcn.00403ff0
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0xcc], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xcc]
call fcn.00405ff0
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x19]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x4c
push ecx
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x44]
call fcn.00405f90
mov dword [ebp - 0x6c], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call fcn.00403b10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x78]
call fcn.00403b10
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0
jl 0x402d1c
cmp dword [ebp - 0xd0], 1
jle 0x402b2d
cmp dword [ebp - 0xd0], 3
je 0x402cc8
jmp 0x402d1c
lea ecx, [ebp - 0x90]
push ecx
lea ecx, [ebp - 0x5c]
call fcn.00403ff0
mov dword [ebp - 0xd4], eax
mov edx, dword [ebp - 0xd4]
mov dword [ebp - 0xd8], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xd8]
call fcn.00405ff0
mov ecx, dword [ebp - 0x34]
sub ecx, eax
mov dword [ebp - 0x64], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90]
call fcn.00403b10
cmp dword [ebp - 0x64], 0
jbe 0x402be0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
push 1
lea edx, [ebp - 0xa0]
push edx
lea ecx, [ebp - 0x5c]
call fcn.00403ff0
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0xe0], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xb8]
or ecx, 1
mov dword [ebp - 0xb8], ecx
mov ecx, dword [ebp - 0xe0]
call fcn.00405ff0
push eax
call fcn.0040aeb0
add esp, 0x10
cmp dword [ebp - 0x64], eax
je 0x402be0
mov dword [ebp - 0xe4], 1
jmp 0x402bea
mov dword [ebp - 0xe4], 0
mov dl, byte [ebp - 0xe4]
mov byte [ebp - 0x91], dl
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xb8]
and eax, 1
je 0x402c1a
and dword [ebp - 0xb8], 0xfffffffe
lea ecx, [ebp - 0xa0]
call fcn.00403b10
movzx ecx, byte [ebp - 0x91]
test ecx, ecx
je 0x402c4a
call fcn.00401a90
mov dword [ebp - 0xa4], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401820
mov eax, dword [ebp - 0xa4]
jmp 0x402d52
mov edx, dword [ebp - 0x10]
mov byte [edx + 0x49], 1
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x19]
cmp eax, ecx
je 0x402c7e
mov edx, dword [ebp + 8]
mov dword [ebp - 0xa8], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401820
mov eax, dword [ebp - 0xa8]
jmp 0x402d52
cmp dword [ebp - 0x64], 0
jbe 0x402c86
jmp 0x402cc6
lea ecx, [ebp - 0x5c]
call fcn.00404da0
cmp eax, 0x20
jae 0x402ca1
push 0
push 8
lea ecx, [ebp - 0x5c]
call fcn.00403e20
jmp 0x402cc6
call fcn.00401a90
mov dword [ebp - 0xac], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401820
mov eax, dword [ebp - 0xac]
jmp 0x402d52
jmp 0x402d3e
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x54]
push ecx
movzx edx, byte [ebp - 0x19]
push edx
call fcn.00402e20
add esp, 8
movzx eax, al
test eax, eax
je 0x402cee
mov ecx, dword [ebp + 8]
mov dword [ebp - 0xe8], ecx
jmp 0x402cf9
call fcn.00401a90
mov dword [ebp - 0xe8], eax
mov edx, dword [ebp - 0xe8]
mov dword [ebp - 0xb0], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401820
mov eax, dword [ebp - 0xb0]
jmp 0x402d52
call fcn.00401a90
mov dword [ebp - 0xb4], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401820
mov eax, dword [ebp - 0xb4]
jmp 0x402d52
jmp 0x402a51
push edx
mov ecx, ebp
push eax
lea edx, [0x402d84]
call fcn.0040ac10
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0xe8
cmp ebp, esp
call fcn.0040abe0
mov esp, ebp
pop ebp
ret 4