Function at 0x495370
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xc8
lea r9, [0x00400000]
mov qword [rsp + 0xc0], rbx
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0xb0], rsi
mov rsi, qword [rsp + 0xd0]
mov qword [rsp + 0xa8], rdi
mov eax, dword [rsi + 4]
mov ecx, dword [rsi]
mov r8d, dword [rsi + 0xc]
mov edx, dword [rsi + 0x10]
mov ebp, dword [rsi + 0x1c]
add rax, r9
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0x98], r13
mov r13d, dword [rsi + 8]
mov qword [rsp + 0x90], r14
mov r14, qword [rsp + 0xd8]
mov qword [rsp + 0x88], r15
mov r15d, dword [rsi + 0x14]
add r13, r9
add r8, r9
add rdx, r9
add r15, r9
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor eax, eax
and ecx, 1
test cl, cl
mov dword [rsp + 0x30], 0x48
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x68], r9
mov dword [rsp + 0x70], r9d
jne 0x495463
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x20]
mov r8d, 1
xor edx, edx
mov ecx, 0xc06d0057
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rdi, qword [r13]
mov rax, r14
sub rax, r8
sar rax, 3
mov r12d, eax
movabs rax, 0x8000000000000000
test qword [rdx + r12*8], rax
mov eax, r9d
sete al
test eax, eax
mov dword [rsp + 0x50], eax
je 0x4954a5
mov eax, dword [rdx + r12*8]
lea rcx, [0x00400002]
add rax, rcx
mov qword [rsp + 0x58], rax
jmp 0x4954ae
movzx eax, word [rdx + r12*8]
mov dword [rsp + 0x58], eax
mov rax, qword [0x004d0dd0]
mov rbx, r9
test rax, rax
je 0x4954d9
lea rdx, [rsp + 0x30]
xor ecx, ecx
call rax
test rax, rax
mov rbx, rax
jne 0x49566b
mov rax, qword [0x004d0dd0]
test rdi, rdi
jne 0x4955b2
test rax, rax
je 0x4954fb
lea rdx, [rsp + 0x30]
mov ecx, 1
call rax
test rax, rax
mov rdi, rax
jne 0x495564
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rdi, rax
jne 0x495564
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
mov rax, qword [0x004d0dc8]
test rax, rax
je 0x495538
lea rdx, [rsp + 0x30]
mov ecx, 3
call rax
test rax, rax
mov rdi, rax
jne 0x495564
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x20]
mov r8d, 1
xor edx, edx
mov ecx, 0xc06d007e
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rax, rdi
xchg qword [r13], rax
cmp rax, rdi
je 0x4955a2
cmp dword [rsi + 0x18], 0
je 0x4955ab
mov edx, InitCommonControls
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x4955ab
mov qword [rax + 8], rsi
mov rcx, qword [0x004d0dc0]
mov qword [rax], rcx
mov qword [0x004d0dc0], rax
jmp 0x4955ab
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [0x004d0dd0]
test rax, rax
mov qword [rsp + 0x60], rdi
je 0x4955cb
lea rdx, [rsp + 0x30]
mov ecx, 2
call rax
mov rbx, rax
test rbx, rbx
jne 0x495668
cmp dword [rsi + 0x14], ebx
je 0x495601
cmp dword [rsi + 0x1c], ebx
je 0x495601
movsxd rax, dword [rdi + 0x3c]
add rax, rdi
cmp dword [rax], 0x4550
jne 0x495601
cmp dword [rax + 8], ebp
jne 0x495601
cmp rdi, qword [rax + 0x30]
jne 0x495601
mov rbx, qword [r15 + r12*8]
test rbx, rbx
jne 0x495668
mov rdx, qword [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
mov rbx, rax
jne 0x495668
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
mov rax, qword [0x004d0dc8]
test rax, rax
je 0x49563c
lea rdx, [rsp + 0x30]
mov ecx, 4
call rax
mov rbx, rax
test rbx, rbx
jne 0x495668
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x20]
mov r8d, 1
xor edx, edx
mov ecx, 0xc06d007f
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov qword [r14], rbx
mov rax, qword [0x004d0dd0]
test rax, rax
je 0x495695
lea rdx, [rsp + 0x30]
mov ecx, 5
mov dword [rsp + 0x70], 0
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rbx
call rax
mov rax, rbx
mov r12, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xc0]
mov r15, qword [rsp + 0x88]
mov r14, qword [rsp + 0x90]
mov r13, qword [rsp + 0x98]
mov rsi, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xb8]
add rsp, 0xc8
ret