Function at 0x140002a50
Capabilities:
Parse pe header

Disassembly:
push rbx
push r12
push r13
sub rsp, 0x20
mov rbx, qword [0x140005d80]
mov r13, rdx
mov r12, rcx
test rbx, rbx
je 0x140002a8a
nop dword [rax]
mov rdx, qword [rbx + 0x28]
mov rcx, r12
call qword [sym.imp.MSVCR90.dll__stricmp]
test eax, eax
je 0x140002aad
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x140002a70
mov eax, 0x5a4d
cmp word [r13], ax
je 0x140002abd
mov ecx, 0xb
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x20
pop r13
pop r12
pop rbx
ret
inc dword [rbx + 0x30]
mov rax, rbx
add rsp, 0x20
pop r13
pop r12
pop rbx
ret
mov qword [rsp + 0x48], rsi
movsxd rsi, dword [r13 + 0x3c]
add rsi, r13
cmp dword [rsi], 0x4550
je 0x140002aed
mov ecx, 0xb
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rsi, qword [rsp + 0x48]
xor eax, eax
add rsp, 0x20
pop r13
pop r12
pop rbx
ret
mov edx, dword [rsi + 0x50]
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x2000
mov qword [rsp + 0x40], rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x140002b40
mov edx, dword [rsi + 0x50]
lea r9d, [rax + 4]
xor ecx, ecx
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x140002b40
lea ecx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002c4f
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], r14
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x48]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r14d, r14d
mov rcx, r12
mov qword [rax + 8], rbp
mov dword [rax + 0x18], r14d
mov qword [rax + 0x10], r14
mov dword [rax + 0x1c], r14d
mov qword [rax + 0x40], r14
mov qword [rax + 0x38], r14
mov dword [rax + 0x30], 1
mov rdi, rax
call qword [sym.imp.MSVCR90.dll__strdup]
mov qword [rdi + 0x20], r14
mov qword [rdi + 0x28], rax
mov edx, dword [rsi + 0x50]
lea r9d, [r14 + 4]
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [rsi + 0x54]
lea r9d, [r14 + 4]
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, r13
add r8d, dword [r13 + 0x3c]
mov rcx, rax
mov rbx, rax
call sub.MSVCR90.dll_memcpy
movsxd rcx, dword [r13 + 0x3c]
mov eax, ebp
add rcx, rbx
mov r8, rdi
mov rdx, rsi
mov qword [rdi], rcx
mov qword [rcx + 0x30], rax
mov rcx, r13
call fcn.140002290
mov edx, ebp
sub edx, dword [rsi + 0x30]
je 0x140002c04
mov rcx, rdi
call fcn.140002480
mov rcx, rdi
call fcn.140002870
test eax, eax
je 0x140002c31
mov rcx, rdi
call fcn.140002380
mov r11, qword [rdi]
mov eax, dword [r11 + 0x28]
test eax, eax
je 0x140002c7a
add rax, rbp
jne 0x140002c63
lea ecx, [rax + 0xb]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.MSVCR90.dll_free]
mov rcx, rdi
call fcn.140002720
xor eax, eax
mov rdi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r13
pop r12
pop rbx
ret
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
je 0x140002c31
mov dword [rdi + 0x1c], 1
mov rax, qword [0x140005d80]
mov qword [rdi + 0x38], rax
mov rax, qword [0x140005d80]
test rax, rax
je 0x140002c95
mov qword [rax + 0x40], rdi
mov qword [rdi + 0x40], r14
mov rax, rdi
mov qword [0x140005d80], rdi
jmp 0x140002c45