Function at 0x4222c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a0dc8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x5f4964]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x5f4964]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x3c], 0
je 0x422523
cmp byte [ebx + 0x41], 0
je 0x422523
mov esi, dword [ebx]
add esi, 4
call fcn.00408280
push eax
mov eax, dword [esi]
mov ecx, ebx
call eax
mov dword [esp + 0x18], eax
call fcn.00408280
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], eax
call fcn.00408260
add esp, 8
test al, al
jne 0x422516
push 0
push 8
lea ecx, [esp + 0x24]
call fcn.00409f80
mov dword [esp + 0x48], 0
lea ecx, [esp + 0x1c]
call fcn.00404e50
mov edi, eax
test edi, edi
je 0x422387
lea ecx, [esp + 0x1c]
call fcn.00404e50
cmp eax, edi
ja 0x422387
lea ecx, [esp + 0x1c]
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jbe 0x42238c
call fcn.0056adc1
lea eax, [esp + 0x1c]
cmp eax, 0xfffffffc
je 0x4223a9
mov ecx, eax
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jb 0x4223a9
call fcn.0056adc1
lea ecx, [esp + 0x1c]
call fcn.00404e50
mov esi, eax
test esi, esi
je 0x4223d6
lea ecx, [esp + 0x1c]
call fcn.00404e50
cmp eax, esi
ja 0x4223d6
lea ecx, [esp + 0x1c]
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp esi, eax
jbe 0x4223db
call fcn.0056adc1
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffc
je 0x4223f6
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp esi, eax
jb 0x4223f6
call fcn.0056adc1
lea ecx, [esp + 0x1c]
call fcn.00403580
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
add eax, edi
lea edi, [esp + 0x14]
push edi
push eax
push esi
lea eax, [ebx + 0x44]
push eax
mov eax, dword [edx + 0x18]
call eax
sub eax, 0
je 0x422432
sub eax, 1
je 0x422436
sub eax, 2
lea ecx, [esp + 0x1c]
jne 0x422511
jmp 0x42251e
mov byte [ebx + 0x41], 0
lea ecx, [esp + 0x1c]
call fcn.00404e50
mov edi, eax
test edi, edi
je 0x422463
lea ecx, [esp + 0x1c]
call fcn.00404e50
cmp eax, edi
ja 0x422463
lea ecx, [esp + 0x1c]
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jbe 0x422468
call fcn.0056adc1
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffc
je 0x422483
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jb 0x422483
call fcn.0056adc1
mov esi, dword [esp + 0x14]
sub esi, edi
je 0x4224ee
lea ecx, [esp + 0x1c]
call fcn.00404e50
mov edi, eax
test edi, edi
je 0x4224b8
lea ecx, [esp + 0x1c]
call fcn.00404e50
cmp eax, edi
ja 0x4224b8
lea ecx, [esp + 0x1c]
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jbe 0x4224bd
call fcn.0056adc1
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x4224da
mov ecx, edx
call fcn.00404e50
add eax, dword [esp + 0x30]
cmp edi, eax
jb 0x4224da
call fcn.0056adc1
mov eax, dword [ebx + 0x4c]
push eax
push esi
push 1
push edi
call fcn.0056bcbd
add esp, 0x10
cmp esi, eax
jne 0x42250d
cmp byte [ebx + 0x41], 0
je 0x42251a
test esi, esi
jne 0x42235a
push esi
push 8
lea ecx, [esp + 0x24]
call fcn.0040b3f0
jmp 0x42235a
lea ecx, [esp + 0x1c]
call fcn.00403540
xor al, al
jmp 0x422525
lea ecx, [esp + 0x1c]
call fcn.00403540
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.0056ab51
mov esp, ebp
pop ebp
ret