Function at 0x4081a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x18ec]
mov ecx, dword [esi + 0x18e0]
add eax, ecx
mov ecx, esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esi + 0x18d8], 1
mov dword [esp + 0x20], eax
call fcn.004051c0
mov ebx, eax
cmp ebx, edi
jne 0x4081f2
mov dword [esi + 0x18bc], 7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [esi + 0x18f4]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x18d8]
dec eax
cmp eax, 3
ja case.default.0x408208
jmp dword [eax*4 + 0x408748]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
push ebp
mov ecx, esi
call fcn.00408960
mov eax, dword [esi + 0x18bc]
test eax, eax
je 0x40823e
cmp eax, 2
jne 0x4086c3
inc edi
cmp edi, 5
jg 0x408622
jmp 0x408217
cmp byte [esi + 0x3078], 0x10
jne 0x408259
cmp byte [esi + 0x3074], 0x5a
jne 0x408259
cmp byte [esi + 0x3075], 0xa5
je 0x408265
inc edi
cmp edi, 5
jg 0x408622
jmp 0x408217
xor edi, edi
mov ecx, esi
mov dword [esp + 0x10], edi
call fcn.00404240
mov eax, dword [esi + 0x18bc]
sub eax, edi
je 0x4082ae
sub eax, 4
je 0x40828d
dec eax
je 0x4086c3
jmp case.default.0x408208
mov eax, dword [esp + 0x14]
mov dword [esi + 0x18d8], 1
inc eax
cmp eax, 5
mov dword [esp + 0x14], eax
jg 0x40866d
jmp case.default.0x408208
mov dword [esi + 0x18d8], 2
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], edi
jmp case.default.0x408208
mov ecx, dword [esi + 0x18e0]
push 0
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ebp, eax
add esp, 0x10
test ebp, ebp
jl 0x4086b9
lea edi, [esi + 0x1908]
mov ecx, edi
call fcn.0040c470
push 1
mov ecx, edi
call fcn.0040c7c0
mov eax, dword [esi + 0x194c]
test eax, eax
jne 0x40872a
mov edx, dword [esi + 0x18f8]
mov eax, dword [esp + 0x18]
sub edx, 2
cmp eax, edx
jne 0x40832c
mov eax, dword [esp + 0x20]
sub eax, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
push ebx
push eax
lea ecx, [esi + 0x1c2b]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov edi, eax
mov al, byte [ebx + 0xc]
add esp, 0x10
test al, 0x20
jne 0x408651
test edi, edi
je 0x40841e
push 1
push 0
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ebp, eax
add esp, 0x10
test ebp, ebp
jl 0x4086b9
mov edx, dword [esp + 0x18]
mov ecx, esi
push edx
push edi
call fcn.00408ac0
mov eax, dword [esi + 0x18bc]
test eax, eax
je 0x4083ac
cmp eax, 2
jne 0x4086c3
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 5
mov dword [esp + 0x10], eax
jg 0x408622
jmp 0x408378
cmp byte [esi + 0x3078], 0x11
jne 0x408398
cmp byte [esi + 0x3074], 0x5a
jne 0x408398
cmp byte [esi + 0x3075], 0xa5
jne 0x408398
mov ecx, esi
mov dword [esp + 0x10], 0
call fcn.00404240
mov eax, dword [esi + 0x18bc]
test eax, eax
je 0x4083fc
cmp eax, 4
jne 0x408378
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 5
mov dword [esp + 0x14], eax
jg 0x40866d
jmp 0x408378
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x18f8]
inc eax
sub ecx, 2
cmp eax, ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
jle 0x4082ed
mov dword [esi + 0x18d8], 3
jmp case.default.0x408208
mov ebp, dword [esi + 0x18f8]
lea edi, [esi + 0x1908]
dec ebp
push 0
mov ecx, edi
mov dword [esp + 0x1c], ebp
call fcn.0040c4b0
mov edx, dword [0x416794]
push edx
push edi
call fcn.0040c5c0
mov edi, dword [esp + 0x18]
add esp, 8
push ebp
mov ecx, esi
call fcn.00408b90
mov eax, dword [esi + 0x18bc]
test eax, eax
je 0x408482
cmp eax, 2
jne 0x4086c3
inc edi
cmp edi, 5
jg 0x408622
jmp 0x40845b
cmp byte [esi + 0x3078], 0x12
jne 0x40849d
cmp byte [esi + 0x3074], 0x5a
jne 0x40849d
cmp byte [esi + 0x3075], 0xa5
je 0x4084a9
inc edi
cmp edi, 5
jg 0x408622
jmp 0x40845b
mov al, byte [esi + 0x307b]
mov dword [esp + 0x10], 0
cmp al, 0xf0
je 0x40869c
cmp al, 0xf1
je 0x4086d5
cmp al, 0xf2
je 0x4086e3
test al, al
jne 0x4084f4
mov eax, dword [esp + 0x14]
mov dword [esi + 0x18d8], 3
inc eax
cmp eax, 5
mov dword [esp + 0x14], eax
jg 0x4086f1
jmp case.default.0x408208
cmp al, 1
je 0x408606
cmp al, 2
jne case.default.0x408208
mov dword [esp + 0x14], 0
mov dword [esi + 0x18d8], 4
jmp case.default.0x408208
mov ecx, esi
xor edi, edi
call fcn.00408760
mov eax, dword [esi + 0x18bc]
test eax, eax
jne 0x4086c3
cmp byte [esi + 0x3078], 0x1f
jne 0x4086b9
lea eax, [esi + 0x3079]
mov ecx, esi
push eax
call fcn.00403b40
and eax, 0xffff
mov dword [esi + 0x18f8], eax
jne 0x408564
mov dword [esi + 0x18f8], 1
mov ecx, dword [esi + 0x18f8]
lea ebp, [esi + 0x1908]
push 1
push ecx
push 0
mov ecx, ebp
call fcn.0040c410
cmp edi, dword [esi + 0x18f8]
jge 0x4085a2
mov ecx, ebp
call fcn.0040c470
push 1
mov ecx, ebp
call fcn.0040c7c0
mov eax, dword [esi + 0x194c]
test eax, eax
jne 0x40872a
mov ecx, esi
call fcn.00408760
mov eax, dword [esi + 0x18bc]
test eax, eax
jne 0x4086c3
lea edx, [esi + 0x307b]
mov ecx, esi
push edx
call fcn.00403b40
mov di, ax
mov eax, dword [esi + 0x18f8]
and edi, 0xffff
cmp edi, eax
jle 0x408582
mov al, byte [esi + 0x307b]
cmp al, 0xf0
je 0x40869c
cmp al, 0xf1
je 0x4086d5
cmp al, 0xf2
je 0x4086e3
test al, al
je 0x4086f1
cmp al, 1
jne case.default.0x408208
push ebx
mov dword [esi + 0x18bc], 0
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [0x41682c]
mov eax, dword [0x4167e4]
push 0x10
push str.EVSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi + 0x18bc], 5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [0x41682c]
mov eax, dword [0x416674]
add esp, 4
mov edx, dword [ecx + 0x20]
push 0x10
push str.EVSimulator_Message
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [0x416694]
push 0x10
push str.EVSimulator_Message
mov ecx, dword [0x41682c]
push eax
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esi + 0x18bc], 5
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [0x416698]
push 0x10
push str.EVSimulator_Message
jmp 0x4086a8
mov eax, dword [0x41669c]
push 0x10
push str.EVSimulator_Message
jmp 0x4086a8
mov ecx, dword [0x41682c]
mov eax, dword [0x416688]
push 0x10
push str.EVSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
push ebx
mov dword [esi + 0x18bc], 4
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi + 0x18bc], 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret