Function at 0x405530
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x441128
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x44fb24]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x44fb24]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
cmp dword [ecx + 0x3c], 0
mov dword [esp + 0x10], ecx
je 0x40584c
cmp byte [ecx + 0x41], 0
je 0x40584c
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffffffffffffffff
call edx
cmp eax, 0xffffffff
je 0x40583f
mov ecx, 0xf
xor eax, eax
cmp ecx, 0x10
mov byte [esp + 0x20], 0
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
jae 0x4055ba
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov edi, edi
cmp edx, 0x10
jb 0x4056e3
test eax, eax
mov ebx, eax
mov dword [esp + 0x14], ebx
je 0x405607
cmp edx, 0x10
mov ecx, eax
jae 0x4055ee
lea ecx, [esp + 0x20]
cmp ecx, ebx
ja 0x405607
cmp edx, 0x10
mov ecx, eax
jae 0x4055fd
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add ecx, esi
cmp ebx, ecx
jbe 0x405614
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x40563f
cmp edx, 0x10
mov ecx, eax
jae 0x405628
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add ecx, esi
cmp ebx, ecx
jb 0x40563f
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp edx, 0x10
mov edi, dword [esp + 0x30]
jb 0x4056f0
test eax, eax
mov esi, eax
je 0x40567a
cmp edx, 0x10
mov ecx, eax
jae 0x40565d
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x40567a
cmp edx, 0x10
mov ecx, eax
jae 0x40566c
lea ecx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add ecx, ebx
cmp esi, ecx
mov ebx, dword [esp + 0x14]
jbe 0x405687
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x4056a8
cmp edx, 0x10
jae 0x405699
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x30]
add eax, edx
cmp esi, eax
jb 0x4056a8
call fcn.004233c2
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
add ebx, edi
push ebx
push esi
add eax, 0x44
push eax
call edx
sub eax, 0
je 0x4056f9
sub eax, 1
je 0x405701
sub eax, 2
lea ecx, [esp + 0x1c]
jne 0x40583a
jmp 0x405847
lea ebx, [esp + 0x20]
mov dword [esp + 0x14], ebx
jmp 0x4055e3
lea esi, [esp + 0x20]
jmp 0x405652
mov eax, dword [esp + 0x10]
mov byte [eax + 0x41], 0
mov edx, dword [esp + 0x34]
cmp edx, 0x10
mov eax, dword [esp + 0x20]
jb 0x405824
test eax, eax
mov esi, eax
je 0x40573c
cmp edx, 0x10
mov ecx, eax
jae 0x405723
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x40573c
cmp edx, 0x10
mov ecx, eax
jae 0x405732
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add ecx, edi
cmp esi, ecx
jbe 0x405749
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x405774
cmp edx, 0x10
mov ecx, eax
jae 0x40575d
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add ecx, edi
cmp esi, ecx
jb 0x405774
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, esi
je 0x405801
cmp edx, 0x10
jb 0x40582d
test eax, eax
mov esi, eax
je 0x4057b3
cmp edx, 0x10
mov ecx, eax
jae 0x40579a
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x4057b3
cmp edx, 0x10
mov ecx, eax
jae 0x4057a9
lea ecx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add ecx, ebx
cmp esi, ecx
jbe 0x4057c0
call fcn.004233c2
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x4057e1
cmp edx, 0x10
jae 0x4057d2
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x30]
add eax, edx
cmp esi, eax
jb 0x4057e1
call fcn.004233c2
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.00423d74
add esp, 0x10
cmp edi, eax
jne 0x405836
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x41], 0
je 0x405843
test edi, edi
jne 0x4055d0
push edi
push 8
lea ecx, [esp + 0x24]
call fcn.004045c0
jmp 0x4055c6
lea esi, [esp + 0x20]
jmp 0x405718
lea esi, [esp + 0x20]
jmp 0x40578f
lea ecx, [esp + 0x1c]
call fcn.004133c0
xor al, al
jmp 0x40584e
lea ecx, [esp + 0x1c]
call fcn.004133c0
mov al, 1
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.00422a4f
mov esp, ebp
pop ebp
ret