Function at 0x4022b0
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0xb0
xor r8d, r8d
xor edx, edx
mov rbx, rcx
mov ecx, dword [rcx]
call sub.msvcrt.dll__lseek
mov ecx, dword [rbx]
lea rdx, [rsp + 0x70]
mov r8d, 0x40
call sub.msvcrt.dll__read
cmp eax, 0x40
jne 0x402551
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
mov r8d, dword [rsp + 0xac]
test rax, rax
je 0x40231a
lea rcx, str.DBG:_SEEK_1__08x_e_lfanew_08x_n
xor edx, edx
call fcn.00401cd0
mov r8d, dword [rsp + 0xac]
mov ecx, dword [rbx]
lea esi, [r8 + 4]
xor r8d, r8d
mov edx, esi
call sub.msvcrt.dll__lseek
mov ecx, dword [rbx]
lea rdx, [rsp + 0x20]
mov r8d, 0x14
call sub.msvcrt.dll__read
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
test rax, rax
je 0x40236d
lea rcx, str.DBG:_SEEK_2__08x_NumberOfSections_d_n
movsxd r8, esi
lea rdx, [r8 - 4]
movzx r8d, word [rsp + 0x22]
call fcn.00401cd0
movzx edx, word [rsp + 0x22]
xor r8d, r8d
movzx eax, word [rsp + 0x30]
add eax, dword [rsp + 0xac]
mov ecx, dword [rbx]
lea edx, [rdx + rdx*4 - 0xa]
lea esi, [rax + rdx*8 + 0x18]
mov edx, esi
call sub.msvcrt.dll__lseek
mov ecx, dword [rbx]
lea rdx, [rsp + 0x40]
mov r8d, 0x28
call sub.msvcrt.dll__read
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
test rax, rax
je 0x402512
mov r9d, dword [rsp + 0x50]
lea rcx, str.DBG:_SEEK_3__08x_PointerToRawData_08x_SizeOfRawData_ld_n
mov edx, esi
mov r8d, dword [rsp + 0x54]
call fcn.00401cd0
lea rdx, str.seek
mov rcx, qword [0x004068c0]
mov esi, dword [rsp + 0x50]
add esi, dword [rsp + 0x54]
call sub.msvcrt.dll_strstr
test rax, rax
je 0x402406
lea rcx, str.DBG:_SEEK_4__08x_End_of_exe_stub_n
mov edx, esi
call fcn.00401cd0
mov ecx, dword [rbx]
xor r8d, r8d
mov edx, esi
call sub.msvcrt.dll__lseek
mov ecx, dword [rbx]
mov r8d, 6
lea rdx, str.P2X_V
call fcn.00401e40
cmp eax, 0xffffffff
mov esi, eax
mov dword [rbx + 0x3c], eax
je 0x402524
mov ecx, dword [rbx]
xor r8d, r8d
mov edx, eax
call sub.msvcrt.dll__lseek
mov edx, 1
mov ecx, 0x15
call sub.msvcrt.dll_calloc
mov ecx, dword [rbx]
mov r8d, 0x14
mov rdx, rax
mov rdi, rax
call sub.msvcrt.dll__read
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
test rax, rax
je 0x40248b
lea rcx, str.DBG:_SEEK_6__08x_p2xar_header_s_n
mov r8, rdi
mov edx, esi
call fcn.00401cd0
mov rcx, rdi
call sub.msvcrt.dll_free
mov ecx, dword [rbx]
lea edx, [rsi + 9]
xor r8d, r8d
call sub.msvcrt.dll__lseek
mov ecx, dword [rbx]
call fcn.00402030
mov rcx, qword [0x004068c0]
lea rdx, str.seek
mov edi, eax
call sub.msvcrt.dll_strstr
test rax, rax
je 0x402520
lea rcx, str.DBG:_SEEK_7_archivesize_8d_n
mov edx, edi
add esi, edi
call fcn.00401cd0
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
test rax, rax
je 0x4024f7
lea rcx, str.DBG:_SEEK_8__8d__n
mov edx, esi
call fcn.00401cd0
mov ecx, dword [rbx]
mov edx, esi
xor r8d, r8d
xor esi, esi
call sub.msvcrt.dll__lseek
mov eax, esi
add rsp, 0xb0
pop rbx
pop rsi
pop rdi
ret
mov esi, dword [rsp + 0x50]
add esi, dword [rsp + 0x54]
jmp 0x402406
add esi, edi
jmp 0x4024f7
mov rcx, qword [0x004068c0]
lea rdx, str.seek
call sub.msvcrt.dll_strstr
test rax, rax
je 0x402548
lea rcx, str.DBG:_SEEK_Archive_header_marker_P2X_Vxx_not_found_n
call fcn.00401cd0
mov ecx, dword [rbx]
call sub.msvcrt.dll__close
jmp 0x402505
mov esi, 0xffffffff
jmp 0x402505