Function at 0x405b1a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da8d1
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x524330]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x118], ecx
or dword [ebp - 0x44], 0xffffffff
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp + 8]
neg eax
sbb eax, eax
inc eax
movzx eax, al
test eax, eax
je 0x405b90
cmp dword [ebp + 8], 0xffffffff
je 0x405b72
mov eax, dword [ebp + 8]
mov dword [ebp - 0x11c], eax
jmp 0x405b80
or eax, 0xffffffff
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x11c]
jmp 0x405f5c
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
je 0x405c34
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 0x118]
mov ecx, dword [ecx + 0x24]
mov ecx, dword [ecx]
add ecx, dword [eax]
cmp dword [ebp - 0x80], ecx
jae 0x405c34
mov al, byte [ebp + 8]
mov byte [ebp - 0x81], al
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x34]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 0x118]
mov ecx, dword [ecx + 0x34]
mov dword [ecx], eax
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x118]
mov ecx, dword [ecx + 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x120]
mov cl, byte [ebp - 0x81]
mov byte [eax], cl
mov eax, dword [ebp + 8]
jmp 0x405f5c
mov eax, dword [ebp - 0x118]
cmp dword [eax + 0x4c], 0
jne 0x405c4d
or eax, 0xffffffff
jmp 0x405f5c
mov eax, dword [ebp - 0x118]
cmp dword [eax + 0x3c], 0
jne 0x405cb7
mov al, byte [ebp + 8]
mov byte [ebp - 0x82], al
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0x88], eax
push dword [ebp - 0x88]
movsx eax, byte [ebp - 0x82]
push eax
call fcn.004bd154
pop ecx
pop ecx
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx eax, cl
test eax, eax
je 0x405ca0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x124], eax
jmp 0x405ca7
or dword [ebp - 0x124], 0xffffffff
mov eax, dword [ebp - 0x124]
jmp 0x405f5c
mov dword [ebp - 0x10], 8
mov al, byte [ebp + 8]
mov byte [ebp - 0x15], al
lea eax, [ebp - 0x91]
mov dword [ebp - 0x90], eax
push 0
push 0
lea ecx, [ebp - 0x3c]
call fcn.00406cea
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.00407512
and dword [ebp - 4], 0
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00406cb0
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x9c]
call fcn.00407a56
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00406cb0
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp - 0xac]
call fcn.00407a56
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0xa0]
add eax, dword [ebp - 0xa4]
push eax
push dword [ebp - 0xb0]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x15]
push eax
mov eax, dword [ebp - 0x118]
add eax, 0x44
push eax
mov eax, dword [ebp - 0xb4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xb4]
call dword [eax + 0x14]
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
jl 0x405f2e
cmp dword [ebp - 0x128], 1
jle 0x405db6
cmp dword [ebp - 0x128], 3
je 0x405ec2
jmp 0x405f2e
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00406cb0
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
call fcn.00407a56
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0xc0]
mov dword [ebp - 0x40], eax
je 0x405e47
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00406cb0
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0xc8]
call fcn.00407a56
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x118]
push dword [eax + 0x4c]
push dword [ebp - 0x40]
push 1
push dword [ebp - 0xcc]
call fcn.004bd0d2
add esp, 0x10
cmp dword [ebp - 0x40], eax
je 0x405e47
or dword [ebp - 0x68], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00406cea
mov eax, dword [ebp - 0x68]
jmp 0x405f5c
mov eax, dword [ebp - 0x118]
mov byte [eax + 0x41], 1
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x15]
cmp eax, ecx
je 0x405e79
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00406cea
mov eax, dword [ebp - 0x6c]
jmp 0x405f5c
cmp dword [ebp - 0x40], 0
jbe 0x405e81
jmp 0x405ebd
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0x20
jae 0x405ea1
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.004069f4
jmp 0x405ebd
or dword [ebp - 0x70], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00406cea
mov eax, dword [ebp - 0x70]
jmp 0x405f5c
jmp 0x405f47
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0xdc], eax
mov al, byte [ebp - 0x15]
mov byte [ebp - 0xd6], al
push dword [ebp - 0xdc]
movsx eax, byte [ebp - 0xd6]
push eax
call fcn.004bd154
pop ecx
pop ecx
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx eax, cl
test eax, eax
je 0x405f09
mov eax, dword [ebp + 8]
mov dword [ebp - 0x12c], eax
jmp 0x405f10
or dword [ebp - 0x12c], 0xffffffff
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x74], eax
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00406cea
mov eax, dword [ebp - 0x74]
jmp 0x405f5c
or dword [ebp - 0x78], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00406cea
mov eax, dword [ebp - 0x78]
jmp 0x405f5c
jmp 0x405cec
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.004bc439
leave
ret 4