Function at 0x401920
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov ebp, dword [esp + 0xb0]
mov eax, dword [ebp]
test eax, eax
je 0x401c54
mov dword [esp + 8], 0
mov dword [esp + 4], 0
lea ebx, [esp + 0x2e]
mov dword [esp], eax
mov dword [esp + 0x30], 0
call sub.msvcrt.dll_fseek
mov eax, dword [ebp]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp byte [esp + 0x2e], 0x4d
jne 0x401a1f
cmp byte [esp + 0x2f], 0x5a
jne 0x401a1f
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3c
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp]
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 0x18], eax
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0
add eax, 0x18
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp]
mov dword [esp + 8], 1
mov dword [esp + 4], 2
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp byte [esp + 0x2e], 0xb
je 0x401be0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 0
sub eax, 0x60
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
test eax, eax
jne 0x401c72
mov eax, dword [ebp]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x60
mov dword [esp + 0xc], eax
lea eax, [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 0x18], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x401c72
lea ebx, [esp + 0x38]
mov eax, str.MEI_f_v_n_v
jmp 0x401abd
sub ebx, 1
cmp ebx, dword [esp + 0x18]
jb 0x401c72
mov ecx, 8
mov esi, eax
mov edi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x401ab0
mov eax, dword [ebx]
lea edi, [ebp + 0x14]
lea ecx, [ebp + 0x10]
mov esi, ebx
and edi, 0xfffffffc
mov dword [ebp + 0x10], eax
mov eax, dword [ebx + 0x54]
sub ecx, edi
sub esi, ecx
add ecx, 0x58
shr ecx, 2
mov dword [ebp + 0x64], eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebp + 0x406c], 0
sub ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
sub edi, eax
mov eax, dword [ebp + 0x1c]
lea ebx, [edi + ebx - 8]
mov dword [ebp + 4], ebx
mov dword [esp], eax
call esi
sub esp, 4
add eax, ebx
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp + 0x20]
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp + 8], eax
je 0x401cba
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp]
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x401c8e
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x20]
mov dword [esp], eax
call esi
add ebx, eax
mov eax, dword [ebp]
sub esp, 4
mov dword [ebp + 0xc], ebx
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
mov ebx, eax
jne 0x401ca4
mov eax, dword [ebp]
test eax, eax
je 0x401bc9
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebp], 0
add esp, 0x9c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [esp + 0x2f]
cmp al, 1
je 0x401c84
cmp al, 2
jne 0x401a1f
mov eax, 0xa8
add eax, dword [esp + 0x30]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp]
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [esp + 0x30]
cmp eax, 0
mov dword [esp + 0x1c], eax
je 0x401a1f
jg 0x401a49
jmp 0x401a1f
lea eax, [ebp + 0x68]
mov dword [esp + 4], 0x40c044
mov dword [esp], eax
call fcn.00403020
test eax, eax
mov dword [ebp], eax
jne 0x40193c
add esp, 0x9c
mov ebx, 0xffffffff
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x98
jmp 0x401bfa
mov dword [esp], str.Could_not_read_from_file.
mov ebx, 0xffffffff
call fcn.00401ec0
jmp 0x401bc9
mov dword [esp], str.Error_on_file
mov ebx, 0xffffffff
call fcn.00401ec0
jmp 0x401bc9
mov dword [esp], str.Could_not_allocate_buffer_for_TOC.
mov ebx, 0xffffffff
call fcn.00401ec0
jmp 0x401bc9