Function at 0x401e60
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov edx, dword [ebx]
test edx, edx
je 0x402020
mov eax, dword [0x41b52c]
mov dword [esp + 8], 8
mov dword [esp], edx
mov ecx, dword [0x41b530]
mov dword [esp + 0x18], eax
shr eax, 0x18
add eax, 0xc
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x1b], al
lea eax, [esp + 0x18]
mov dword [esp + 4], eax
call fcn.00408330
mov edi, edx
or edx, eax
mov esi, eax
je 0x40203f
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0040ec30
test eax, eax
js 0x40208f
mov eax, dword [ebx]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x58
mov dword [esp + 0xc], eax
lea eax, [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x402061
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x28]
add esi, 0x58
mov dword [ebx + 0x5074], 0
mov ebp, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x2c]
adc edi, 0
bswap eax
bswap edx
mov dword [ebx + 0x28], edx
xor edx, edx
sub esi, eax
bswap ebp
mov dword [ebx + 0x20], eax
bswap ecx
mov dword [ebx + 8], esi
sbb edi, edx
add esi, ebp
mov dword [ebx + 0x2c], ecx
mov dword [ebx + 0x24], ebp
mov dword [ebx + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [0x423048], ecx
mov dword [esp], eax
call fcn.0040ec30
mov esi, dword [ebx + 0x28]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x10], eax
test eax, eax
je 0x4020a5
mov edx, dword [ebx]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x402046
mov eax, dword [ebx + 0x28]
add eax, dword [ebx + 0x10]
mov dword [ebx + 0x14], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
mov esi, eax
test eax, eax
jne 0x40207c
mov eax, dword [ebx + 0x10]
mov edi, dword [ebx + 0x14]
lea esi, [esi]
cmp eax, edi
jae 0x402000
mov ecx, dword [eax + 4]
mov edx, dword [eax]
bswap ecx
mov dword [eax + 4], ecx
mov ecx, dword [eax + 8]
bswap edx
mov dword [eax], edx
bswap ecx
mov dword [eax + 8], ecx
mov ecx, dword [eax + 0xc]
bswap ecx
mov dword [eax + 0xc], ecx
add eax, edx
cmp eax, dword [ebx + 0x10]
jae 0x401fb8
mov dword [esp], str.Cannot_read_Table_of_Contents._n
call fcn.00402ed0
mov eax, dword [ebx + 0x14]
mov edi, eax
cmp eax, edi
jb 0x401fbc
lea esi, [esi]
lea esi, [esi]
mov eax, dword [ebx]
test eax, eax
je 0x402014
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebx], 0
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebx + 0x70]
mov dword [esp + 4], 0x419184
mov dword [esp], eax
call fcn.004046d0
mov dword [ebx], eax
mov edx, eax
test eax, eax
jne 0x401e75
mov esi, 0xffffffff
jmp 0x402014
mov dword [esp + 4], str.Could_not_read_full_TOC__n
mov esi, 0xffffffff
mov dword [esp], str.fread
call fcn.00403030
jmp 0x402014
mov dword [esp + 4], str.Failed_to_read_cookie__n
mov esi, 0xffffffff
mov dword [esp], str.fread
call fcn.00403030
jmp 0x402014
mov dword [esp], str.Error_on_file._n
mov esi, 0xffffffff
call fcn.00402ed0
jmp 0x402014
mov dword [esp + 4], str.Failed_to_seek_to_cookie_position__n
mov dword [esp], str.fseek
call fcn.00403030
jmp 0x40203f
mov dword [esp + 4], str.Could_not_allocate_buffer_for_TOC__n
or esi, 0xffffffff
mov dword [esp], 0x4190d2
call fcn.00403030
jmp 0x402014