Function at 0x401db0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
add esp, 0xffffff80
mov dword [esp + 4], 0x41a164
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00403fa0
mov dword [esp + 0x1c], eax
test eax, eax
je 0x402088
mov esi, eax
mov eax, dword [0x41bd54]
mov edx, dword [0x41bd58]
lea ebx, [esp + 0x20]
mov dword [esp + 8], 8
mov dword [esp + 0x20], eax
shr eax, 0x18
add eax, 0xc
mov dword [esp + 0x24], edx
mov byte [esp + 0x23], al
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00407d50
mov ecx, edx
mov dword [esp + 0x10], eax
mov edx, eax
or eax, ecx
mov dword [esp + 0x14], ecx
jne 0x401e40
xor ebx, ebx
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0040f880
test eax, eax
js 0x402098
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x58
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
test eax, eax
je 0x4020c0
mov dword [esp + 4], 0x1060
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
je 0x40212e
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x41a161
mov dword [esp + 4], 0x1000
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.00401850
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
bswap eax
movd xmm0, eax
mov eax, dword [esp + 0x2c]
bswap edx
mov dword [ebx + 0x1018], edx
movd xmm4, edx
bswap eax
mov ecx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0x41a161
movd xmm5, ecx
mov dword [esp + 4], 0x40
bswap eax
movd xmm1, eax
lea eax, [esp + 0x38]
punpckldq xmm0, xmm5
mov dword [esp + 0xc], eax
lea eax, [ebx + 0x101c]
punpckldq xmm1, xmm4
mov dword [esp], eax
punpcklqdq xmm0, xmm1
movups xmmword [esp + 0x28], xmm0
call fcn.00401850
xor edx, edx
mov eax, 0x58
sub eax, dword [esp + 0x28]
sbb edx, 0
add eax, dword [esp + 0x10]
adc edx, dword [esp + 0x14]
mov dword [ebx + 0x1000], eax
add eax, dword [esp + 0x2c]
mov dword [ebx + 0x1004], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.0040f880
mov esi, dword [esp + 0x30]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x1008], eax
test eax, eax
je 0x402109
mov edi, dword [esp + 0x1c]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x402060
mov eax, dword [esp + 0x30]
add eax, dword [ebx + 0x1008]
mov dword [ebx + 0x100c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4020f8
mov eax, dword [ebx + 0x1008]
mov edi, dword [ebx + 0x100c]
cmp eax, edi
jae 0x401e24
mov dword [esp + 0x10], ebx
jmp 0x401ffd
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x1010], 1
add eax, edx
cmp eax, edi
jae 0x4020e8
mov esi, dword [eax + 8]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
bswap esi
movd xmm0, esi
mov esi, dword [eax + 0xc]
bswap edx
bswap ecx
movd xmm1, edx
movd xmm3, ecx
bswap esi
movd xmm2, esi
movzx esi, byte [eax + 0x11]
punpckldq xmm1, xmm3
punpckldq xmm0, xmm2
punpcklqdq xmm1, xmm0
lea ecx, [esi - 0x5a]
movups xmmword [eax], xmm1
cmp cl, 0x1e
ja 0x401ff3
mov ebx, 0x40100501
bt ebx, ecx
jb 0x401fe8
mov ecx, esi
cmp cl, 0x6c
jne 0x401ff3
mov ebx, dword [esp + 0x10]
mov dword [ebx + 0x1014], eax
jmp 0x401ff3
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 8], str.Could_not_read_full_TOC__n
mov eax, dword [eax]
mov dword [esp], str.fread
mov dword [esp + 4], eax
call fcn.004024f0
jmp 0x401e24
lea esp, [ebp - 0xc]
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 8], str.Failed_to_seek_to_cookie_position__n
mov eax, dword [eax]
mov dword [esp], str.fseek
mov dword [esp + 4], eax
call fcn.004024f0
jmp 0x401e22
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 8], str.Failed_to_read_cookie__n
mov eax, dword [eax]
mov dword [esp], str.fread
mov dword [esp + 4], eax
call fcn.004024f0
jmp 0x401e22
mov ebx, dword [esp + 0x10]
jmp 0x401e24
mov dword [esp], str.Error_on_file._n
call fcn.00402450
jmp 0x401e24
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 8], str.Could_not_allocate_buffer_for_TOC__n
mov eax, dword [eax]
mov dword [esp], str.malloc
mov dword [esp + 4], eax
call fcn.004024f0
jmp 0x401e24
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 8], str.Could_not_allocate_memory_for_archive_structure__n
mov eax, dword [eax]
mov dword [esp], 0x41a3a6
mov dword [esp + 4], eax
call fcn.004024f0
jmp 0x401e22