Function at 0x406db0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x468298
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4a5590]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x4a5590]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
jne 0x406df8
xor eax, eax
jmp 0x406fa3
mov eax, dword [edi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x406e23
mov edx, dword [edi + 0x30]
mov esi, dword [edx]
lea eax, [esi + ecx]
cmp ecx, eax
jae 0x406e23
lea eax, [esi - 1]
mov dword [edx], eax
mov ecx, dword [edi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov byte [edx], bl
jmp 0x406fa1
cmp dword [edi + 0x50], 0
jne 0x406e31
or eax, 0xffffffff
jmp 0x406fa3
mov edx, dword [edi + 0xc]
lea eax, [edi + 0x44]
cmp dword [edx], eax
jne 0x406e4f
mov eax, dword [edi + 0x38]
mov ecx, dword [edi + 0x3c]
mov dword [edx], eax
mov eax, dword [edi + 0x1c]
mov dword [eax], ecx
mov eax, dword [edi + 0x2c]
sub ecx, ecx
mov dword [eax], ecx
cmp dword [edi + 0x40], 0
jne 0x406e74
push dword [edi + 0x50]
movsx eax, bl
push eax
call fcn.0044c2fc
add esp, 8
cmp eax, 0xffffffff
jne 0x406fa1
or ebx, eax
jmp 0x406fa1
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x20], 0
mov byte [esp + 0x10], bl
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
cmp ecx, 0x10
jae 0x406ea1
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
lea ecx, [ecx]
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x406ebf
lea eax, [esp + 0x20]
cmp dword [esp + 0x34], 0x10
mov esi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jae 0x406ed2
lea esi, [esp + 0x20]
mov ecx, dword [edi + 0x40]
lea eax, [esp + 0x18]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x34]
add eax, dword [esp + 0x18]
push eax
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x21]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [edi + 0x48]
push eax
call dword [edx + 0x1c]
mov ebx, dword [ebp + 8]
test eax, eax
js 0x406f8b
cmp eax, 1
jg 0x406f73
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x406f1b
lea eax, [esp + 0x20]
mov esi, dword [esp + 0x18]
sub esi, eax
je 0x406f45
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x406f32
lea eax, [esp + 0x20]
push dword [edi + 0x50]
push esi
push 1
push eax
call fcn.0044d9e4
add esp, 0x10
cmp esi, eax
jne 0x406f8b
lea eax, [esp + 0x10]
mov byte [edi + 0x45], 1
cmp dword [esp + 0x1c], eax
jne 0x406f8e
test esi, esi
jne 0x406eb0
cmp dword [esp + 0x30], 0x20
jae 0x406f8b
push esi
push 8
lea ecx, [esp + 0x28]
call fcn.00407650
jmp 0x406eb0
cmp eax, 3
jne 0x406f8b
push dword [edi + 0x50]
push dword [esp + 0x14]
call fcn.00401a00
add esp, 8
test al, al
jne 0x406f8e
or ebx, 0xffffffff
cmp dword [esp + 0x34], 0x10
jb 0x406fa1
push dword [esp + 0x20]
call fcn.0044d5f9
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0044c2ed
mov esp, ebp
pop ebp
ret 4