Function at 0x402ed0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push edi
call sub.msvcrt.dll__strdup
add esp, 0xc
mov dword [ebx], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 8], 0
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x28], 8
push 0
push 8
mov esi, dword [ebp + 0x10]
push esi
call fcn.00405360
add esp, 0x10
test eax, eax
je 0x402f70
push ebx
push ebx
mov ecx, dword [ebp + 0xc]
push ecx
push str._s:_failed_to_seek_to_first_archive_header_n
call fcn.004025d0
mov eax, 1
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 0x10]
push edx
lea edx, [ebx + 0x34]
push 0x3c
push 1
mov dword [ebp - 0x10], edx
push edx
call sub.msvcrt.dll_fread
add esp, 0x10
cmp eax, 0x3c
je 0x402fc0
test eax, eax
jne 0x402fa0
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
push eax
mov eax, dword [ebp + 0xc]
push eax
push str._s:_failed_to_read_archive_header_n
call fcn.004025d0
mov eax, 1
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, str._
mov ecx, 0x10
cld
mov esi, dword [ebp - 0x10]
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4030a6
mov eax, str._SYM64_
mov ecx, 0x10
cld
mov esi, dword [ebp - 0x10]
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4030c7
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x403104
mov eax, str.__
mov ecx, 0x10
cld
mov esi, dword [ebp - 0x10]
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x402f90
push eax
lea eax, [ebx + 0x64]
push 0xa
push 0
push eax
call sub.msvcrt.dll_strtoul
add esp, 0x10
mov edx, eax
mov dword [ebx + 0x20], eax
cmp eax, 7
jbe 0x4030e7
test eax, eax
js 0x403146
mov eax, dword [ebx + 0x28]
sub esp, 0xc
add eax, 0x3c
add eax, edx
mov dword [ebx + 0x28], eax
mov eax, dword [ebx + 0x20]
inc eax
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov dword [ebx + 0x1c], eax
test eax, eax
je 0x403163
mov edx, dword [ebp + 0x10]
push edx
push 1
mov edi, dword [ebx + 0x20]
push edi
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
dec eax
je 0x40311c
sub esp, 0xc
mov esi, dword [ebx + 0x1c]
push esi
call sub.msvcrt.dll_free
mov dword [ebx + 0x1c], 0
mov eax, dword [ebp + 0xc]
pop edx
pop ecx
push eax
push str._s:_failed_to_read_long_symbol_name_string_table_n
call fcn.004025d0
mov eax, 1
add esp, 0x10
jmp 0x402f68
mov ecx, dword [ebp + 0x18]
mov edx, 4
mov eax, ebx
call fcn.00402b30
test eax, eax
jne 0x402ffb
mov eax, 1
jmp 0x402f68
mov dword [ebx + 0x30], 1
mov ecx, dword [ebp + 0x18]
mov edx, 8
mov eax, ebx
call fcn.00402b30
test eax, eax
jne 0x402ffb
jmp 0x4030bd
push edi
push eax
mov esi, dword [ebp + 0xc]
push esi
push str._s:_long_name_table_is_too_small___size___ld__n
call fcn.004025d0
mov eax, 1
add esp, 0x10
jmp 0x402f68
push eax
push eax
mov eax, dword [ebp + 0xc]
push eax
push str._s_has_no_archive_index_n
call fcn.004024a0
add esp, 0x10
jmp 0x402ffb
test byte [ebx + 0x20], 1
je 0x403135
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
dec eax
mov dword [edx + 4], eax
test eax, eax
js 0x40317d
mov eax, dword [edx]
inc eax
mov dword [edx], eax
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x1c]
mov byte [edx + eax], 0
xor eax, eax
jmp 0x402f68
push ebx
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str._s:_long_name_table_is_too_big___size__0x_lx__n
call fcn.004025d0
mov eax, 1
add esp, 0x10
jmp 0x402f68
sub esp, 0xc
push str.Out_of_memory_reading_long_symbol_names_in_archive_n
call fcn.004025d0
mov eax, 1
add esp, 0x10
jmp 0x402f68
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
call sub.msvcrt.dll__filbuf
add esp, 0x10
jmp 0x403135