Function at 0x402530
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
lea eax, [eax + 0x64]
mov esi, ecx
sub esp, 0x4c
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
test eax, eax
js 0x402730
mov edx, eax
and edx, 1
test esi, esi
lea ecx, [edx + eax]
mov eax, dword [ebx + 0x28]
lea eax, [ecx + eax + 0x3c]
mov dword [ebx + 0x28], eax
je 0x4025e4
cmp edi, 8
ja 0x402865
cmp ecx, edi
jb 0x4025d0
mov eax, dword [ebx + 4]
lea ebp, [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp + 0x28], ecx
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp eax, edi
mov esi, eax
mov ecx, dword [esp + 0x28]
je 0x402651
mov eax, dword [ebx]
mov dword [esp], str._s:_failed_to_read_archive_index_n
mov dword [esp + 4], eax
call fcn.004022f0
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx]
mov dword [esp], str._s:_the_archive_index_is_empty_n
mov dword [esp + 4], eax
call fcn.004022f0
jmp 0x4025c6
mov eax, dword [ebx + 4]
mov dword [esp + 8], 1
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00405b60
test eax, eax
jne 0x402750
mov eax, dword [ebx + 4]
mov dword [esp + 8], 0x3c
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
lea eax, [ebx + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x402644
cmp eax, 0x3c
je 0x402644
mov eax, dword [ebx]
mov dword [esp], str._s:_failed_to_read_archive_header_following_archive_index_n
mov dword [esp + 4], eax
call fcn.004022f0
xor eax, eax
jmp 0x4025c8
add esp, 0x4c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 0x28], ecx
call fcn.00402340
mov edi, eax
mov dword [ebx + 8], eax
mov eax, edx
imul eax, esi
mov ecx, dword [esp + 0x28]
mov ebp, edx
mov dword [ebx + 0xc], edx
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], eax
mov eax, edi
sub ecx, esi
mul esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], ecx
mov ecx, edx
add ecx, dword [esp + 0x2c]
cmp dword [esp + 0x24], ecx
jb 0x402700
ja 0x4026a2
cmp dword [esp + 0x28], eax
jb 0x402700
cmp ebp, 0
ja 0x402700
cmp edi, dword [esp + 0x28]
ja 0x402700
mov eax, esi
imul eax, edi
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x20], eax
je 0x402800
mov eax, dword [ebx + 4]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 4], esi
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sub.msvcrt.dll_fread
mov ebp, eax
mov eax, dword [ebx + 8]
xor eax, ebp
or eax, dword [ebx + 0xc]
je 0x402769
mov dword [esp], edi
call fcn.0040be80
jmp 0x4025b4
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp], str._s:_the_archive_index_is_supposed_to_have_0x_lx_entries_of__d_bytes__but_the_size_is_only_0x_lx_n
mov dword [esp + 0x10], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
call fcn.004022f0
jmp 0x4025c6
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], str._s:_invalid_archive_header_size:__ld_n
mov dword [esp + 4], eax
call fcn.004022f0
xor eax, eax
jmp 0x4025c8
mov eax, dword [ebx]
mov dword [esp], str._s:_failed_to_skip_archive_symbol_table_n
mov dword [esp + 4], eax
call fcn.004022f0
xor eax, eax
jmp 0x4025c8
mov eax, ebp
mov edi, dword [esp + 0x28]
imul eax, esi
sub edi, eax
lea eax, [ebp*8]
mov dword [esp + 0x2c], edi
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebx + 0x10], eax
je 0x402881
xor edi, edi
test ebp, ebp
mov ecx, dword [esp + 0x20]
je 0x4027c9
mov dword [esp + 0x28], esi
mov esi, ecx
lea ebp, [eax + edi*8]
mov eax, dword [esp + 0x28]
mov dword [esp], esi
add edi, 1
mov dword [esp + 4], eax
call fcn.00402340
add esi, dword [esp + 0x28]
mov dword [ebp + 4], edx
xor edx, edx
mov dword [ebp], eax
cmp edx, dword [ebx + 0xc]
jbe 0x4027f4
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.0040be80
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x402811
mov eax, dword [ebx]
mov dword [esp], str._s:_the_archive_has_an_index_but_no_symbols_n
mov dword [esp + 4], eax
call fcn.004022f0
jmp 0x4025c6
jb 0x4027fb
cmp edi, dword [ebx + 8]
jae 0x4027c9
mov eax, dword [ebx + 0x10]
jmp 0x4027a2
mov dword [esp], str.Out_of_memory_whilst_trying_to_read_archive_symbol_index_n
call fcn.004022f0
jmp 0x4025c6
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebx + 0x14], eax
je 0x40289e
mov esi, dword [esp + 0x2c]
mov edx, dword [ebx + 4]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebx + 0x18], esi
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
call sub.msvcrt.dll_fread
cmp eax, esi
je 0x402603
mov eax, dword [ebx]
mov dword [esp], str._s:_failed_to_read_archive_index_symbol_table_n
mov dword [esp + 4], eax
call fcn.004022f0
jmp 0x4025c6
mov dword [esp + 8], 0x1ed
mov dword [esp + 4], str..._.._binutils_binutils_elfcomm.c
mov dword [esp], str.sizeof_ar_index___sizeof_integer_buffer
call sub.msvcrt.dll__assert
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.0040be80
mov dword [esp], str.Out_of_memory_whilst_trying_to_convert_the_archive_symbol_index_n
call fcn.004022f0
jmp 0x4025c6
mov dword [esp], str.Out_of_memory_whilst_trying_to_read_archive_index_symbol_table_n
call fcn.004022f0
jmp 0x4025c6