Function at 0x140049d10
Capabilities:
Get system information on windows
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x140175060]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor ebx, ebx
mov r15, rdx
mov r14, rcx
cmp rdx, 0x40
jae 0x140049d49
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140049f2e
mov eax, 0x5a4d
cmp word [rcx], ax
je 0x140049d65
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140049f2e
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp rdx, rax
jb 0x140049d37
cmp dword [rcx + r14], 0x4550
mov qword [rsp + 0x90], rsi
lea rsi, [rcx + r14]
jne 0x140049d9e
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x140049d9e
mov ecx, dword [rsi + 0x38]
test cl, 1
je 0x140049db0
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140049f26
movzx eax, word [rsi + 0x14]
lea rdx, [rsi + 0x24]
mov qword [rsp + 0x98], rdi
add rdx, rax
movzx eax, word [rsi + 6]
mov r9, rcx
test eax, eax
je 0x140049df3
mov r8d, eax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x140049ddf
mov eax, dword [rdx]
add rax, r9
jmp 0x140049de3
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
dec r8
jne 0x140049dd1
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r8d, dword [rsp + 0x24]
lea edx, [r8 - 1]
lea edi, [r8 - 1]
lea rcx, [r8 - 1]
add edi, dword [rsi + 0x50]
not edx
add rcx, rbx
and rdi, rdx
and rcx, rdx
cmp rdi, rcx
je 0x140049e34
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140049f1e
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rdi
mov qword [rsp + 0x88], rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x140049e7a
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x140049eab
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x140049eb8
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140049f14
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
mov qword [rdi + 0x40], 0
shr eax, 0xd
and eax, 1
mov dword [rdi + 0x20], eax
lea rax, [0x140049ce0]
mov qword [rdi + 0x28], rax
lea rax, [0x140049cf0]
mov qword [rdi + 0x30], rax
lea rax, [0x140049d00]
mov qword [rdi + 0x38], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x50], eax
mov edx, dword [rsi + 0x54]
cmp r15, rdx
jae 0x140049f45
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.14004a1b0
xor eax, eax
mov rbp, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400cbcb0
add rsp, 0x60
pop r15
pop r14
pop rbx
ret
mov r9d, 4
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, r14
mov rcx, rax
mov rbx, rax
call fcn.1400cdc90
movsxd rax, dword [r14 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov rdx, r15
mov qword [rdi], rax
mov rcx, r14
mov qword [rax + 0x30], rbp
call fcn.140049620
test eax, eax
je 0x140049f0c
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x140049fad
mov rcx, rdi
call fcn.140049a40
mov dword [rdi + 0x24], eax
jmp 0x140049fb4
mov dword [rdi + 0x24], 1
mov rcx, rdi
call fcn.140049b10
test eax, eax
je 0x140049f0c
mov rcx, rdi
call fcn.140049820
test eax, eax
je 0x140049f0c
mov rax, qword [rdi]
mov rsi, qword [rdi + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x14004a019
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x14004a019
mov rax, qword [rbx]
test rax, rax
je 0x14004a019
nop word [rax + rax]
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x14004a000
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x14004a062
cmp dword [rdi + 0x20], 0
lea rax, [rcx + rbp]
je 0x14004a056
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x14004a047
mov ecx, 0x45a
jmp 0x140049f06
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x140049f16
mov qword [rdi + 0x48], rax
mov rax, rdi
jmp 0x140049f16
mov qword [rdi + 0x48], 0
mov rax, rdi
jmp 0x140049f16