Function at 0x422700
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x154
push ebx
push ebp
push esi
mov esi, dword [esp + 0x164]
xor ebx, ebx
push edi
cmp dword [esp + 0x16c], ebx
jne 0x422739
cmp esi, ebx
jne 0x42272b
cmp dword [0x4f5c80], 0x18
je 0x422739
jmp 0x42273f
cmp esi, 1
jne 0x42273f
cmp dword [0x4f5c80], 0x17
jne 0x42273f
mov dword [0x4f5c80], ebx
cmp dword [0x4f5c88], ebx
je 0x42274c
call fcn.00423890
push 0x2d0
push 0x500
push 0x7f8
call fcn.00449090
mov eax, 0x4f2714
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
add esp, 0xc
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x7f8
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 0xfffffffe
call fcn.00449a60
call fcn.00434560
push ebx
xor eax, eax
call fcn.00433e90
mov edi, dword [esi*4 + 0x4f26fc]
add esp, 4
mov eax, edi
call fcn.0043ac90
mov edx, eax
call fcn.00466630
mov ebp, eax
cmp ebp, ebx
jle 0x42281b
mov esi, 0x39b
mov ebx, 0x4f5cb0
lea ebx, [ebx]
mov eax, dword [esp + 0x168]
mov edi, dword [eax*4 + 0x4f26fc]
mov eax, edi
call fcn.0043ac90
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
lea edx, [esi - 0x39a]
push edx
push esi
call fcn.00401530
add esp, 0x14
test eax, eax
je 0x4228c6
inc esi
lea eax, [esi - 0x39b]
add ebx, 0x18
cmp eax, ebp
jl 0x4227d0
mov esi, dword [esp + 0x168]
xor ebx, ebx
mov ecx, dword [esi*4 + 0x4f2704]
push 0xff
push ebx
push ebx
push ecx
push 0x4f5cb0
call fcn.00434080
add esp, 0x14
test eax, eax
je 0x4228c6
mov esi, dword [esi*4 + 0x4f270c]
mov eax, esi
call fcn.0043ac90
push 1
mov ebp, eax
push 1
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x4c]
push eax
push ebp
mov eax, esi
call fcn.004666e0
add esp, 0x14
test eax, eax
je 0x4228c6
cmp dword [esp + 0x14], 8
jne 0x4228c6
mov eax, dword [esp + 0x44]
imul eax, dword [esp + 0x40]
add eax, 7
push eax
call fcn.004836a3
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4228c6
test bl, 7
je 0x4228a1
mov ecx, ebx
shr ecx, 3
lea edi, [ecx*8 + 8]
jmp 0x4228a3
mov edi, ebx
push 0
push 1
lea edx, [esp + 0x48]
push edi
push edx
mov eax, esi
mov edx, ebp
call fcn.00466950
add esp, 0x10
test eax, eax
jne 0x4228d8
push ebx
call fcn.004835c6
add esp, 4
call fcn.00423890
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret
push 0x2d0
push 0x500
push 0x3cd
mov dword [0x4f5c98], ebx
mov dword [0x4f5c9c], edi
call fcn.00449090
add esp, 0xc
test eax, eax
je 0x4228c6
push 0xe1007
call fcn.004836a3
add esp, 4
mov dword [0x4f5ca0], eax
test eax, eax
je 0x4228c6
test al, 7
je 0x422923
shr eax, 3
lea eax, [eax*8 + 8]
mov dword [0x4f5ca4], eax
push 1
xor eax, eax
call fcn.0042e880
add esp, 4
test eax, eax
jle 0x4229a2
cmp eax, 1
mov dword [0x4f6628], eax
jge 0x42294b
lea ecx, [eax + 5]
mov dword [0x4f6628], ecx
lea ecx, [eax - 1]
cmp ecx, 1
mov dword [0x4f662c], ecx
jge 0x422962
add ecx, 5
mov dword [0x4f662c], ecx
lea ecx, [eax - 2]
cmp ecx, 1
mov dword [0x4f6630], ecx
jge 0x422979
add ecx, 5
mov dword [0x4f6630], ecx
lea ecx, [eax - 3]
cmp ecx, 1
mov dword [0x4f6634], ecx
jge 0x422990
add ecx, 5
mov dword [0x4f6634], ecx
add eax, 0xfffffffc
cmp eax, 1
mov dword [0x4f6638], eax
jge 0x4229bd
add eax, 5
jmp 0x4229b8
xor eax, eax
mov dword [0x4f6628], eax
mov dword [0x4f662c], eax
mov dword [0x4f6630], eax
mov dword [0x4f6634], eax
mov dword [0x4f6638], eax
push 0
mov eax, 1
call fcn.0042e880
add esp, 4
test eax, eax
jle 0x422a3a
cmp eax, 0x65
mov dword [0x4f663c], eax
jge 0x4229e3
lea edx, [eax + 5]
mov dword [0x4f663c], edx
lea ecx, [eax - 1]
cmp ecx, 0x65
mov dword [0x4f6640], ecx
jge 0x4229fa
add ecx, 5
mov dword [0x4f6640], ecx
lea ecx, [eax - 2]
cmp ecx, 0x65
mov dword [0x4f6644], ecx
jge 0x422a11
add ecx, 5
mov dword [0x4f6644], ecx
lea ecx, [eax - 3]
cmp ecx, 0x65
mov dword [0x4f6648], ecx
jge 0x422a28
add ecx, 5
mov dword [0x4f6648], ecx
add eax, 0xfffffffc
cmp eax, 0x65
mov dword [0x4f664c], eax
jge 0x422a58
add eax, 5
jmp 0x422a53
mov eax, 0x3e7
mov dword [0x4f663c], eax
mov dword [0x4f6640], eax
mov dword [0x4f6644], eax
mov dword [0x4f6648], eax
mov dword [0x4f664c], eax
xor ebp, ebp
mov ebx, 0x4f6650
mov dword [esp + 0x14], 0x4f6904
push 0x45
push 0
push ebx
call fcn.00487bc0
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0x16c
push 0
push eax
call fcn.00487bc0
mov eax, dword [0x4f5c7c]
add esp, 0xc
cmp eax, 9
push 0x912e68
jge 0x422ab0
lea ecx, [eax + eax*4]
lea edx, [ebp + ecx*2 + 1]
push edx
push 0x912f68
push str._s_save_03d._s
lea eax, [esp + 0x68]
push eax
jmp 0x422ae5
cmp ebp, 5
jge 0x422ace
mov ecx, dword [ebp*4 + 0x4f6628]
push ecx
push 0x912f68
push str._s_asave_1d._s
lea edx, [esp + 0x68]
push edx
jmp 0x422ae5
mov eax, dword [ebp*4 + 0x4f6628]
push eax
push 0x912f68
push str._s_save_03d._s
lea ecx, [esp + 0x68]
push ecx
call fcn.00483a3c
add esp, 0x14
push 0
push 0
lea edx, [ebp + 0x3c3]
push 1
push edx
lea edi, [esp + 0x68]
call fcn.00401410
mov eax, edi
push 0x4c70fc
push eax
call fcn.0048466b
mov esi, eax
add esp, 0x18
test esi, esi
je 0x422b45
push 2
push 0xffffffffffffffbc
push esi
call fcn.004853aa
add esp, 0xc
push esi
push 0x44
push 1
push ebx
call fcn.00484992
push ebp
mov ecx, esi
call fcn.004313b0
add esp, 0x14
push esi
call fcn.004854f7
add esp, 4
mov eax, dword [esp + 0x14]
add eax, 0x16c
inc ebp
add ebx, 0x45
cmp eax, 0x4f773c
mov dword [esp + 0x14], eax
jl 0x422a67
mov esi, dword [esp + 0x168]
xor edi, edi
cmp esi, edi
je 0x422b76
cmp dword [0x4fdaa4], edi
jne 0x422bc4
cmp dword [0x4fdab0], edi
jne 0x422bc4
mov ebx, 1
push ebx
call fcn.00418640
add esp, 4
push ebx
mov eax, ebx
call fcn.00433e90
add esp, 4
push 0x4fda90
call fcn.00451170
add esp, 4
test eax, eax
je 0x422bae
mov dword [0x4fdab0], ebx
push ebx
xor eax, eax
call fcn.00433e90
add esp, 4
push ebx
call fcn.00418640
add esp, 4
jmp 0x422bc9
mov ebx, 1
push edi
xor eax, eax
mov dword [0x4f9e60], edi
call fcn.0042e880
xor ecx, ecx
add esp, 4
cmp esi, edi
sete cl
xor edx, edx
cmp esi, edi
setne dl
mov dword [0x4f5c78], eax
mov dword [0x4f5c84], esi
mov dword [0x4f5c88], ebx
mov dword [0x4fda9c], ecx
mov dword [0x4fdaac], ebx
mov dword [0x4fdaa0], edx
call fcn.00422fd0
mov eax, dword [0x5ff4b4]
mov dword [esp + 0x18], eax
mov eax, 0x4f2714
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0x7f8
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 0xfffffffe
call fcn.00449a60
mov esi, 0x12c
mov dword [0x5ff4a8], ebx
mov dword [0x5ff4ac], edi
mov dword [0x5ff4b0], 0x8e
mov dword [0x5ff4c0], esi
call dword [0x4b939c]
cmp dword [0x5ff4b0], 0x2f
mov dword [0x5ff4bc], eax
jne 0x422ca8
mov ecx, dword [0x904a44]
mov edx, dword [0x5ff4b8]
mov eax, dword [edx*4 + 0x902a38]
push ecx
mov ecx, dword [0x5ff4b4]
mov edx, dword [ecx*4 + 0x902a38]
push eax
mov eax, dword [0x5ff4c0]
push edx
push eax
push 0x2f
call fcn.0043eb70
cmp dword [0x9133f4], edi
je 0x422ce2
cmp dword [0x913404], edi
jne 0x422ce2
mov dword [0x913418], edi
mov dword [0x913408], edi
mov dword [0x91340c], esi
mov dword [0x913414], edi
mov dword [0x913400], edi
mov dword [0x913410], ebx
mov dword [0x913404], ebx
mov eax, dword [0x904a18]
cmp eax, edi
je 0x422d06
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [0x904a18], edi
mov dword [0x7f2678], edi
mov byte [0x9016f4], 0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x154
ret