Function at 0x401680
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x68
mov ebx, dword [ecx]
mov edi, dword [ecx + 4]
mov eax, dword [ebx]
test eax, eax
je 0x401810
mov eax, dword [edi + 4]
mov esi, dword [ebx + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x5c], eax
call eax
sub esp, 4
add esi, eax
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcr100.dll_fseek
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [ebp - 0x5c]
sub esp, 4
mov dword [esp], eax
call sub.msvcr100.dll_malloc
test eax, eax
mov esi, eax
je 0x401853
mov ecx, dword [ebx]
mov eax, dword [edi + 8]
mov dword [ebp - 0x60], ecx
mov dword [esp], eax
call dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
sub esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0xc], ecx
call sub.msvcr100.dll_fread
test eax, eax
je 0x401840
cmp byte [edi + 0x10], 1
je 0x401750
mov eax, dword [ebx]
test eax, eax
je 0x40173d
mov dword [esp], eax
call sub.msvcr100.dll_fclose
mov dword [ebx], 0
lea esp, [ebp - 0x10]
mov eax, esi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
call fcn.00408d20
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call dword [ebp - 0x5c]
sub esp, 4
mov dword [esp], eax
call sub.msvcr100.dll_malloc
test eax, eax
mov dword [ebp - 0x60], eax
je 0x4018b8
mov eax, dword [edi + 8]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x50], esi
mov dword [esp], eax
call dword [ebp - 0x5c]
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x4c], eax
sub esp, 4
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x44], edx
mov dword [esp], eax
call dword [ebp - 0x5c]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x50]
sub esp, 4
mov dword [esp + 8], 0x38
mov dword [esp + 4], 0x40d0b7
mov dword [esp], eax
call fcn.00406160
test eax, eax
js 0x401866
lea eax, [ebp - 0x50]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00406200
test eax, eax
js 0x40189f
lea eax, [ebp - 0x50]
mov dword [esp], eax
call fcn.004081d0
mov dword [esp], esi
call sub.msvcr100.dll_free
mov esi, dword [ebp - 0x60]
jmp 0x401729
lea eax, [ebx + 0x68]
mov dword [esp + 4], 0x40d050
mov dword [esp], eax
call fcn.004031b0
test eax, eax
mov dword [ebx], eax
jne 0x4016a3
mov dword [esp], str.Cannot_open_archive_file_n
xor esi, esi
call fcn.00401f50
jmp 0x40173d
mov dword [esp], str.Could_not_read_from_file_n
xor esi, esi
call fcn.00401f50
jmp 0x40173d
mov dword [esp], str.Could_not_allocate_read_buffer_n
xor esi, esi
call fcn.00401f50
jmp 0x40173d
mov ecx, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflateInit:__s_n
mov dword [esp + 8], ecx
call fcn.00401f50
mov dword [esp], esi
xor esi, esi
call sub.msvcr100.dll_free
lea edx, [edi + 0x12]
mov dword [esp], str.Error_decompressing__s_n
mov dword [esp + 4], edx
call fcn.00401f50
jmp 0x40173d
mov ecx, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflate:__s_n
mov dword [esp + 8], ecx
call fcn.00401f50
jmp 0x40187d
mov dword [esp], str.Error_allocating_decompression_buffer_n
call fcn.00401f50
jmp 0x40187d