Function at 0x40f1b9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
call sub.MSVCRT20.dll__kbhit
cmp dword [0x42b124], 0
je 0x40f281
cmp dword [0x42b124], 1
jne 0x40f250
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_ftell]
add esp, 4
mov dword [0x42b608], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.00416661
add esp, 4
mov word [ebp - 0x5c], ax
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
cmp eax, 0xea60
jne 0x40f23b
mov eax, dword [ebp + 0xc]
push eax
call fcn.00416661
add esp, 4
mov dword [0x42c264], eax
cmp dword [0x42c264], 0
jne 0x40f23b
xor eax, eax
jmp 0x40fdf5
push 0
mov eax, dword [0x42b608]
push eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fseek]
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
push 1
call fcn.0040ef95
add esp, 8
test eax, eax
jge 0x40f281
push 0x126
push 0
push 0x42f7a0
call fcn.0040f144
add esp, 0xc
xor eax, eax
jmp 0x40fdf5
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_ftell]
add esp, 4
mov dword [0x42b608], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.00416661
add esp, 4
mov word [ebp - 0x5c], ax
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
cmp eax, 0xea60
je 0x40f2f6
cmp dword [ebp + 8], 0
je 0x40f2db
push 0x131
mov eax, dword [ebp + 0x10]
push eax
push 0x430a98
call fcn.0040f144
add esp, 0xc
jmp 0x40f2ef
push 0x134
push 0
push 0x42f7a0
call fcn.0040f144
add esp, 0xc
xor eax, eax
jmp 0x40fdf5
mov eax, dword [ebp + 0xc]
push eax
call fcn.00416661
add esp, 4
mov dword [0x42c264], eax
cmp dword [0x42c264], 0
jne 0x40f31b
xor eax, eax
jmp 0x40fdf5
cmp dword [0x42c264], 0xa28
jbe 0x40f346
push 0x13b
push 0
push 0x42f7a0
call fcn.0040f144
add esp, 0xc
xor eax, eax
jmp 0x40fdf5
mov dword [0x42d100], 0xffffffff
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [0x42c264]
push eax
mov eax, dword [0x42c0d4]
push eax
call fcn.004166d5
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
call fcn.0041669b
add esp, 4
mov dword [0x42b478], eax
mov eax, dword [0x42d100]
not eax
cmp eax, dword [0x42b478]
je 0x40f3a7
push 0x142
push 0
push 0x4304e8
call fcn.0040f144
add esp, 0xc
xor eax, eax
jmp 0x40fdf5
mov eax, dword [0x42c0d4]
mov dword [0x42b09c], eax
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42b8a8], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c1e4], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c150], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c0b0], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c210], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
movsx eax, byte [eax]
and eax, 0xff
mov dword [0x42c324], eax
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
movsx eax, byte [eax]
and eax, 0xff
mov dword [0x42c160], eax
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c25c], al
inc dword [0x42b09c]
call fcn.0040ee0a
push eax
xor eax, eax
mov al, byte [0x42c0b0]
push eax
push 0x42c340
call fcn.00423cdf
add esp, 0xc
call fcn.0040ee0a
mov dword [0x42c0a8], eax
call fcn.0040ee0a
mov dword [0x42b544], eax
call fcn.0040ee0a
mov dword [0x42c114], eax
call fcn.0040ede0
mov word [0x42b5fc], ax
call fcn.0040ede0
push eax
xor eax, eax
mov al, byte [0x42c0b0]
push eax
push 0x42c3c0
call fcn.004236f0
add esp, 0xc
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42c0ec], al
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42cc08], al
inc dword [0x42b09c]
cmp dword [0x42c0f0], 0
je 0x40f523
push 0x42b178
push 0x42c340
call fcn.00423d91
add esp, 8
test eax, eax
jle 0x40f523
mov eax, dword [0x42c160]
push eax
call fcn.0040ef44
add esp, 4
test eax, eax
je 0x40f523
mov eax, dword [0x42c340]
mov ecx, dword [0x42c344]
mov dword [0x42b178], eax
mov dword [0x42b17c], ecx
mov dword [0x42b430], 0
mov dword [0x42c378], 0
push 0
push 0xffff
push 0x42c220
call fcn.00423cdf
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x40f5c3
mov byte [0x42b098], 0
mov dword [0x42b534], 0
xor eax, eax
mov al, byte [0x42b8a8]
cmp eax, 0x22
jl 0x40f5be
mov eax, dword [0x42b09c]
movsx eax, byte [eax]
and eax, 0xff
mov dword [0x42b534], eax
inc dword [0x42b09c]
mov eax, dword [0x42b09c]
mov al, byte [eax]
mov byte [0x42b098], al
inc dword [0x42b09c]
call fcn.0040ede0
movsx eax, byte [0x42b098]
test al, 1
je 0x40f5be
mov dword [0x42b404], 1
jmp 0x40f66d
xor eax, eax
mov al, byte [0x42b8a8]
cmp eax, 0x2e
jge 0x40f605
xor eax, eax
mov al, byte [0x42c210]
test al, 8
je 0x40f600
call fcn.0040ee0a
mov dword [0x42b430], eax
mov dword [0x42c378], 1
mov eax, dword [0x42c160]
mov dword [0x42c364], eax
jmp 0x40f66d
call fcn.0040ee0a
mov dword [0x42b430], eax
xor eax, eax
mov al, byte [0x42c210]
test al, 8
je 0x40f632
mov dword [0x42c378], 1
mov eax, dword [0x42c160]
mov dword [0x42c364], eax
call fcn.0040ee0a
push eax
xor eax, eax
mov al, byte [0x42c0b0]
push eax
push 0x42c220
call fcn.00423cdf
add esp, 0xc
call fcn.0040ee0a
push eax
xor eax, eax
mov al, byte [0x42c0b0]
push eax
push 0x42c118
call fcn.00423cdf
add esp, 0xc
call fcn.0040ee0a
cmp dword [ebp + 8], 0
jne 0x40f698
call fcn.0040f183
test eax, eax
je 0x40f698
push 0x195
push 0
push 0x42f7a0
call fcn.0040f144
add esp, 0xc
xor eax, eax
mov al, byte [0x42c210]
test al, 1
je 0x40f6b6
mov dword [0x42c334], 1
jmp 0x40f6c0
mov dword [0x42c334], 0
xor eax, eax
mov al, byte [0x42c0b0]
push eax
push 0x42c340
call fcn.00423d5d
add esp, 8
mov dword [0x42b4c0], eax
xor eax, eax
mov al, byte [0x42b8a8]
add eax, dword [0x42c0d4]
mov dword [0x42c208], eax
call fcn.0040eea9
push 0x200
mov eax, dword [0x42c208]
push eax
push 0x42b630
call fcn.00419717
add esp, 0xc
push 0x800
mov eax, dword [0x42b854]
push eax
mov eax, dword [0x42b420]
push eax
call fcn.00419717
add esp, 0xc
cmp dword [ebp + 8], 0
jne 0x40f777
cmp dword [0x42cc70], 1
jne 0x40f777
cmp dword [0x42cc80], 0
je 0x40f777
push 0x200
mov eax, dword [0x42b854]
push eax
push 0x42b630
call fcn.00419717
add esp, 0xc
push 0x800
mov eax, dword [0x42c208]
push eax
mov eax, dword [0x42b420]
push eax
call fcn.00419717
add esp, 0xc
mov byte [0x42b82f], 0
mov eax, dword [0x42b420]
mov byte [eax + 0x7ff], 0
xor eax, eax
mov al, byte [0x42c0b0]
push eax
call fcn.00409430
add esp, 4
test eax, eax
jne 0x40f7bc
cmp dword [0x42c160], 1
jne 0x40f7bc
push 0x42b630
call fcn.0041977b
add esp, 4
xor eax, eax
mov al, byte [0x42c210]
test al, 0x10
je 0x40f7d8
push 0x42b630
call fcn.0041c141
add esp, 4
xor eax, eax
mov al, byte [0x42c0b0]
push eax
call fcn.00409430
add esp, 4
test eax, eax
je 0x40f807
push 0
push 0
push 0x42b630
call fcn.0041eba2
add esp, 0xc
mov word [0x42b5fc], ax
xor eax, eax
mov al, byte [0x42c0b0]
push eax
call fcn.00409430
add esp, 4
test eax, eax
jne 0x40f837
call fcn.0040eed8
mov eax, dword [0x432348]
push eax
call fcn.0041977b
add esp, 4
call fcn.0040ef09
cmp dword [ebp + 8], 0
je 0x40f99a
xor eax, eax
mov al, byte [0x42c210]
test al, 1
je 0x40f85a
mov dword [0x42c190], 1
xor eax, eax
mov al, byte [0x42c210]
test al, 4
je 0x40f878
mov dword [0x42c0ac], 1
jmp 0x40f882
mov dword [0x42c0ac], 0
xor eax, eax
mov al, byte [0x42c210]
test al, 0x40
je 0x40f8af
mov dword [0x42c18c], 1
mov eax, dword [0x42b544]
mov dword [0x42b4c4], eax
mov eax, dword [0x42c114]
mov dword [0x42cca0], eax
xor eax, eax
mov al, byte [0x42c0ec]
and eax, 0xf
mov dword [0x42b524], eax
xor eax, eax
mov al, byte [0x42c210]
test al, 0x80
je 0x40f8d7
mov dword [0x42cc80], 1
xor eax, eax
mov al, byte [0x42c210]
test al, 2
je 0x40f8f0
mov dword [0x42b5ac], 1
xor eax, eax
mov al, byte [0x42c210]
test al, 8
je 0x40f909
mov dword [0x42c258], 1
cmp dword [ebp + 8], 1
jne 0x40f995
xor eax, eax
mov al, byte [0x42cc08]
test eax, eax
jle 0x40f995
cmp dword [0x42b410], 0
je 0x40f94b
cmp dword [0x42c380], 0xfa
jg 0x40f94b
inc byte [0x42cc08]
inc dword [0x42b480]
cmp dword [0x42c310], 0
jne 0x40f969
xor eax, eax
mov al, byte [0x42cc08]
mov dword [0x42cbf8], eax
jmp 0x40f973
mov al, byte [0x42cbf8]
mov byte [0x42cc08], al
cmp dword [0x42cbf8], 0xfa
jle 0x40f995
push 0xfa
push 0x42f630
call fcn.004081d7
add esp, 8
jmp 0x40f9cc
xor eax, eax
mov al, byte [0x42c210]
test al, 4
je 0x40f9c2
mov dword [0x42c278], 1
mov eax, dword [0x42c278]
mov dword [0x42c200], eax
jmp 0x40f9cc
mov dword [0x42c200], 0
cmp dword [0x42c160], 5
jne 0x40f9f8
xor eax, eax
mov al, byte [0x42cc08]
cmp eax, dword [0x42c1f8]
jle 0x40f9f8
xor eax, eax
mov al, byte [0x42cc08]
mov dword [0x42c1f8], eax
cmp dword [0x42cca4], 0
jne 0x40fa1f
cmp dword [0x42b458], 0
je 0x40fb5d
cmp dword [0x42c0f0], 0
je 0x40fb5d
cmp dword [0x42c324], 4
jne 0x40fa39
push 0x4311d0
call fcn.004081d7
add esp, 4
cmp dword [0x42cbf8], 0
jle 0x40fa53
push 0x4310f0
call fcn.004081d7
add esp, 4
cmp dword [0x42b5c0], 0
jne 0x40fa7a
cmp dword [0x42c160], 4
jne 0x40fa7a
push str.SFX_
call fcn.004081d7
add esp, 4
cmp dword [0x42c2ec], 0
jne 0x40fac1
cmp dword [0x42cca4], 0
je 0x40fac1
cmp dword [0x42b5c0], 0
jne 0x40fac1
cmp dword [0x42b524], 3
jle 0x40fac1
mov eax, dword [0x42b524]
push eax
push 0x430298
call fcn.004081d7
add esp, 8
cmp dword [0x42cca4], 2
je 0x40fadb
cmp dword [0x42b458], 1
jne 0x40fb5d
cmp dword [0x42c160], 1
je 0x40faf5
cmp dword [0x42cc70], 0
je 0x40fb02
push 0x431610
call fcn.004081d7
add esp, 4
cmp dword [0x42b5a4], 0
je 0x40fb1c
push 0x431610
call fcn.004081d7
add esp, 4
xor eax, eax
mov al, byte [0x42c0b0]
push eax
call fcn.00409430
add esp, 4
test eax, eax
jne 0x40fb41
push 0x431610
call fcn.004081d7
add esp, 4
xor eax, eax
mov al, byte [0x42c210]
test al, 1
je 0x40fb5d
push 0x431168
call fcn.004081d7
add esp, 4
xor eax, eax
mov al, byte [0x42c210]
test al, 8
jne 0x40fbb6
mov eax, dword [0x42b608]
cmp dword [0x42b134], eax
je 0x40fbb6
cmp dword [0x42c170], 0
je 0x40fbac
mov eax, dword [0x42c170]
push eax
call fcn.0042368d
add esp, 4
mov dword [0x42c170], 0
mov dword [0x42b548], 0
mov al, byte [0x42c25c]
mov byte [0x42b0a0], al
mov eax, dword [ebp + 0xc]
push eax
call fcn.00416661
add esp, 4
mov word [ebp - 0x5c], ax
test dword [ebp - 0x5c], 0xffff
je 0x40fdeb
mov dword [0x42d100], 0xffffffff
mov eax, dword [ebp + 0xc]
push eax
push 1
push 1
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
test eax, eax
jne 0x40fc07
push 0x42f988
call fcn.004081d7
add esp, 4
push 1
lea eax, [ebp - 0x50]
push eax
call fcn.00418da1
add esp, 8
mov dword [0x42b548], 1
xor eax, eax
mov al, byte [0x42c210]
test al, 8
je 0x40fc65
cmp dword [0x42c170], 0
jne 0x40fc65
push 1
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
add eax, 3
push eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fseek]
add esp, 0xc
mov dword [0x42b548], 0
jmp 0x40fde6
cmp dword [0x42c170], 0
jne 0x40fc7c
call fcn.00423500
mov dword [0x42c170], eax
mov eax, dword [ebp + 0xc]
push eax
push 1
push 1
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
test eax, eax
jne 0x40fca6
push 0x42f988
call fcn.004081d7
add esp, 4
push 1
lea eax, [ebp - 0xc]
push eax
call fcn.00418da1
add esp, 8
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
sub eax, 2
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
push eax
push 0
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [0x42c170]
push eax
call fcn.004235d1
add esp, 0x10
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 8]
sub eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
add eax, dword [ecx + 4]
mov dword [ebp - 8], eax
movsx eax, byte [ebp - 0xc]
test eax, eax
je 0x40fd07
mov eax, dword [ebp - 0x54]
mov byte [eax + 0x10], 1
jmp 0x40fd0e
mov eax, dword [ebp - 0x54]
mov byte [eax + 0x10], 0
cmp dword [ebp - 0x58], 0
jbe 0x40fd93
mov eax, dword [ebp - 0x58]
cmp eax, 0x40
jb 0x40fd29
mov eax, 0x40
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push 1
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 4]
je 0x40fd59
push 0x42f988
call fcn.004081d7
add esp, 4
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCRT20.dll_memmove]
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00418da1
add esp, 8
xor eax, eax
sub eax, dword [ebp - 4]
neg eax
sub dword [ebp - 0x58], eax
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
jmp 0x40fd0e
mov eax, dword [ebp + 0xc]
push eax
call fcn.0041669b
add esp, 4
mov ecx, dword [0x42d100]
not ecx
cmp eax, ecx
je 0x40fde6
cmp dword [0x42b124], 2
je 0x40fdce
push 0x42f7a0
call fcn.004081d7
add esp, 4
jmp 0x40fde6
mov eax, dword [0x42c170]
push eax
call fcn.0042368d
add esp, 4
mov dword [0x42c170], 0
jmp 0x40fbb6
mov eax, 1
jmp 0x40fdf5
pop edi
pop esi
pop ebx
leave
ret