Function at 0x401860
Capabilities:
Read file on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
xor edi, edi
push esi
xor esi, esi
push ebx
sub esp, 0xdc
xor ebx, ebx
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x8c], edi
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
mov eax, 0xffffffff
test ecx, ecx
js 0x401b5c
mov edx, 8
lea ebx, [ebp - 0x80]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, 8
jne 0x401b49
cld
mov edi, str.__arch__n
mov ecx, 8
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x401b49
mov eax, 8
mov dword [ebp - 0x94], eax
xor eax, eax
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x94]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x90]
mov dword [esp], ecx
call sub.msvcrt.dll__lseek
test eax, eax
js 0x401c84
mov eax, 0x3c
mov dword [esp + 8], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x90]
mov dword [esp], edx
call sub.msvcrt.dll__read
test eax, eax
je 0x401c6c
cmp eax, 0x3c
jne 0x401c5e
lea ecx, [ebp - 0x78]
mov eax, 0x10
mov dword [ebp - 0x98], ecx
mov dword [esp + 8], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.msvcrt.dll_memmove
lea edx, [ebp - 0x68]
mov dword [ebp - 0xac], edx
lea esi, [esi]
lea edi, [edi]
mov ecx, dword [ebp - 0xac]
mov byte [ecx], 0
mov eax, dword [ebp - 0x98]
cmp ecx, eax
jbe 0x401be4
dec ecx
mov dword [ebp - 0xac], ecx
movzx ebx, byte [ecx]
cmp bl, 0x20
je 0x401980
cld
xor eax, eax
mov esi, dword [ebp - 0x98]
mov dword [ebp - 0x9c], eax
mov eax, 3
mov edi, 0x424109
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4019db
mov esi, dword [ebp - 0x98]
mov eax, 0xd
mov edi, str.ARFILENAMES_
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4019e6
mov eax, 1
mov dword [ebp - 0x9c], eax
cmp bl, 0x2f
je 0x401c50
mov edi, dword [ebp - 0x9c]
test edi, edi
jne 0x401b64
mov edx, dword [ebp - 0x98]
movzx ecx, byte [edx]
cmp cl, 0x20
sete al
cmp cl, 0x2f
sete dl
or eax, edx
test al, 1
je 0x401b6d
mov esi, dword [ebp - 0x8c]
test esi, esi
je 0x401b6d
mov eax, dword [ebp - 0x98]
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov ebx, dword [ebp - 0x8c]
add eax, ebx
mov dword [ebp - 0x98], eax
mov ecx, 1
mov dword [ebp - 0x88], ecx
lea esi, [esi]
lea edi, [edi]
lea eax, [ebp - 0x84]
mov edx, 0x424119
mov dword [esp + 8], eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_atol
mov edi, eax
lea eax, [ebp - 0x36]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov esi, eax
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov ebx, eax
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sub.msvcrt.dll_atol
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x28], ecx
mov edx, dword [ebp - 0x84]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edi
mov eax, dword [ebp - 0x94]
add eax, 0x3c
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 0xc], eax
xor eax, eax
cmp dword [ebp - 0x88], 0
sete al
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x98]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x90]
mov dword [esp], ecx
call dword [ebp + 0xc]
test eax, eax
mov ebx, eax
jne 0x401c92
mov eax, dword [ebp - 0x9c]
test eax, eax
jne 0x401bf2
mov edx, dword [ebp - 0x94]
lea eax, [edi + edx]
lea ecx, [eax + 0x3c]
mov dword [ebp - 0x94], ecx
test cl, 1
je 0x4018f3
add eax, 0x3d
jmp 0x4018ed
mov edx, dword [ebp - 0x90]
mov dword [esp], edx
call sub.msvcrt.dll__close
mov eax, 0xfffffffe
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x98]
movzx ecx, byte [eax]
cmp cl, 0x23
jne 0x401a60
mov edx, dword [ebp - 0x98]
cmp byte [edx + 1], 0x31
jne 0x401a60
cmp byte [edx + 2], 0x2f
jne 0x401a60
mov eax, edx
add eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov ebx, eax
lea eax, [eax + 0x1f]
and eax, 0xfffffff0
call fcn.004217a0
lea ecx, [esp + 0x3b]
and ecx, 0xfffffff0
mov dword [ebp - 0x98], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, ebx
jne 0x401b49
mov edx, dword [ebp - 0x98]
mov byte [eax + edx], 0
jmp 0x401a47
mov edx, dword [ebp - 0xac]
movzx ebx, byte [edx]
jmp 0x4019a6
lea eax, [edi + 0x1e]
and eax, 0xfffffff0
call fcn.004217a0
lea ebx, [esp + 0x3b]
and ebx, 0xfffffff0
mov dword [ebp - 0x8c], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, edi
jne 0x401c5e
lea edx, [ebx + edi]
mov eax, ebx
lea esi, [esi]
cmp eax, edx
jae 0x401b26
cmp byte [eax], 0xa
je 0x401c40
inc eax
jmp 0x401c30
cmp byte [eax - 1], 0x2f
mov byte [eax], 0
jne 0x401c3d
mov byte [eax - 1], 0
inc eax
jmp 0x401c30
mov eax, dword [ebp - 0xac]
mov byte [eax], 0
jmp 0x4019ef
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
jmp 0x401b52
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__close
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x90]
mov dword [esp], ecx
jmp 0x401b52
mov ecx, dword [ebp - 0x90]
mov dword [esp], ecx
call sub.msvcrt.dll__close
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret