Function at 0x422290
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5dfb58
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x658aa8]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
cmp dword [ecx + 0x3c], 0
mov dword [esp + 0x14], ecx
je 0x422555
cmp byte [ecx + 0x41], 0
je 0x422555
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffffffffffffffff
call edx
cmp eax, 0xffffffff
je 0x422548
lea edi, [esp + 0x24]
call fcn.00421c00
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
cmp edx, 0x10
jb 0x422419
mov esi, ecx
mov dword [esp + 0x10], esi
test ecx, ecx
je 0x422341
mov eax, ecx
cmp edx, 0x10
jae 0x422328
lea eax, [esp + 0x28]
cmp eax, esi
ja 0x422341
mov eax, ecx
cmp edx, 0x10
jae 0x422337
lea eax, [esp + 0x28]
mov ebx, dword [esp + 0x38]
add eax, ebx
cmp esi, eax
jbe 0x422352
call fcn.00499c03
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x24]
cmp eax, 0xfffffffc
je 0x42237d
mov eax, ecx
cmp edx, 0x10
jae 0x422366
lea eax, [esp + 0x28]
add eax, ebx
cmp esi, eax
jb 0x42237d
call fcn.00499c03
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
mov edi, ebx
cmp edx, 0x10
jb 0x422428
mov esi, ecx
test ecx, ecx
je 0x4223ae
mov eax, ecx
cmp edx, 0x10
jae 0x422399
lea eax, [esp + 0x28]
cmp eax, esi
ja 0x4223ae
mov eax, ecx
cmp edx, 0x10
jae 0x4223a8
lea eax, [esp + 0x28]
add eax, ebx
cmp esi, eax
jbe 0x4223bf
call fcn.00499c03
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x24]
cmp eax, 0xfffffffc
je 0x4223de
mov eax, ecx
cmp edx, 0x10
jae 0x4223d3
lea eax, [esp + 0x28]
add eax, ebx
cmp esi, eax
jb 0x4223de
call fcn.00499c03
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
add eax, edi
push eax
push esi
lea eax, [ebx + 0x44]
push eax
call edx
sub eax, 0
je 0x422431
sub eax, 1
je 0x422435
sub eax, 2
lea ecx, [esp + 0x24]
jne 0x422543
jmp 0x422550
lea eax, [esp + 0x28]
mov dword [esp + 0x10], eax
mov esi, eax
jmp 0x42231d
lea esi, [esp + 0x28]
jmp 0x42238e
mov byte [ebx + 0x41], 0
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cmp edx, 0x10
jb 0x4224dd
mov esi, ecx
test ecx, ecx
je 0x422470
mov eax, ecx
cmp edx, 0x10
jae 0x422457
lea eax, [esp + 0x28]
cmp eax, esi
ja 0x422470
mov eax, ecx
cmp edx, 0x10
jae 0x422466
lea eax, [esp + 0x28]
mov edi, dword [esp + 0x38]
add eax, edi
cmp esi, eax
jbe 0x42247d
call fcn.00499c03
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x24]
cmp eax, 0xfffffffc
je 0x4224a8
mov eax, ecx
cmp edx, 0x10
jae 0x422491
lea eax, [esp + 0x28]
mov edi, dword [esp + 0x38]
add eax, edi
cmp esi, eax
jb 0x4224a8
call fcn.00499c03
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
sub ebx, esi
je 0x42251b
lea ecx, [esp + 0x1c]
push ecx
lea edi, [esp + 0x28]
call fcn.00421d00
mov esi, eax
mov eax, dword [esi]
cmp eax, 0xfffffffc
je 0x4224f8
test eax, eax
jne 0x4224d0
call fcn.00499c03
mov eax, dword [esi]
cmp dword [eax + 0x18], 0x10
jb 0x4224e6
mov ecx, dword [eax + 4]
jmp 0x4224e9
lea esi, [esp + 0x28]
jmp 0x42244c
lea ecx, [eax + 4]
mov edx, dword [eax + 0x14]
add edx, ecx
cmp dword [esi + 4], edx
jb 0x4224f8
call fcn.00499c03
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x4c]
mov esi, dword [esi + 4]
push ecx
push ebx
push 1
push esi
call fcn.0049cd23
add esp, 0x10
cmp ebx, eax
jne 0x42253f
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
cmp byte [eax + 0x41], 0
je 0x42254c
test ebx, ebx
jne 0x42230a
push ebx
lea eax, [ebx + 8]
lea edi, [esp + 0x28]
call fcn.00421c60
jmp 0x422302
lea ecx, [esp + 0x24]
call fcn.00413f50
xor al, al
jmp 0x422557
lea ecx, [esp + 0x24]
call fcn.00413f50
mov al, 1
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00499a1c
mov esp, ebp
pop ebp
ret