Function at 0x140046474
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x60
mov r11, qword [r8]
xor eax, eax
mov r10d, dword [r8 + 0xc]
xor ebx, ebx
and qword [rbp - 0x38], 0
add r10, r11
mov dword [rbp - 0x40], ebx
mov rsi, r8
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
test rcx, rcx
je 0x14004654d
mov eax, dword [r10 + 0x20]
xor r9d, r9d
mov ecx, dword [r10 + 0x18]
add rax, r11
mov qword [rbp - 0x30], rax
mov eax, dword [r10 + 0x24]
add rax, r11
sub ecx, 1
mov qword [rbp - 0x28], rax
js 0x1400466e2
mov rbx, qword [rbp - 0x30]
mov rsi, qword [rbp + 0x20]
lea edx, [rcx + r9]
sar edx, 1
movsxd rax, edx
mov edi, dword [rbx + rax*4]
mov rax, rsi
add rdi, r11
sub rdi, rsi
mov r8b, byte [rax]
cmp r8b, byte [rax + rdi]
jne 0x140046517
inc rax
test r8b, r8b
jne 0x140046502
xor eax, eax
jmp 0x14004651c
sbb eax, eax
or eax, 1
test eax, eax
jns 0x140046525
lea ecx, [rdx - 1]
jmp 0x14004652b
jle 0x140046530
lea r9d, [rdx + 1]
cmp ecx, r9d
jge 0x1400464ed
mov ebx, dword [rbp - 0x40]
mov rsi, qword [rbp + 0x30]
cmp ecx, r9d
jl 0x1400466e2
mov rcx, qword [rbp - 0x28]
movsxd rax, edx
movzx edx, word [rcx + rax*2]
jmp 0x140046552
sub dx, word [r10 + 0x10]
mov eax, dword [r10 + 0x1c]
add rax, r11
movzx ecx, dx
mov ecx, dword [rax + rcx*4]
add rcx, r11
mov qword [rbp - 0x38], rcx
cmp rcx, r11
jb 0x1400466e2
mov eax, dword [rsi + 8]
add rax, r11
cmp rcx, rax
jae 0x1400466e2
cmp rcx, r10
jbe 0x1400466d0
mov eax, dword [rsi + 0x10]
add rax, r10
cmp rcx, rax
jae 0x1400466d0
mov edx, 0x2e
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strchr]
xor esi, esi
mov rdi, rax
test rax, rax
jne 0x1400465b5
mov ebx, 0xc000007b
jmp 0x1400466e7
lea r8, [rbp - 0x20]
xor ecx, ecx
lea rdx, [0x14008c998]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x1400466e2
mov rax, qword [rbp - 0x20]
test rax, rax
je 0x1400466e2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400466e2
movsxd rcx, dword [rax + 0x3c]
cmp ecx, 0x10000000
jae 0x1400466e2
add rcx, qword [rbp - 0x20]
cmp rcx, qword [rbp - 0x20]
jb 0x1400466e2
cmp dword [rcx], 0x4550
jne 0x1400466e2
movzx eax, word [rcx + 0x18]
mov edx, 0x10b
sub ax, dx
mov edx, 0xfeff
test dx, ax
jne 0x1400466e2
mov rax, qword [rcx + 0x88]
mov qword [rbp - 0x14], rax
mov eax, dword [rcx + 0x50]
mov dword [rbp - 0x18], eax
lea r10, [rdi + 1]
mov ebx, esi
cmp byte [r10], 0x23
mov ecx, esi
jne 0x1400466b3
lea rdx, [rdi + 2]
mov r10, rsi
mov r9d, esi
test rdx, rdx
je 0x1400466e7
mov ax, 0x20
jmp 0x14004666b
add rdx, 2
cmp word [rdx], ax
je 0x140046667
cmp word [rdx], 0x2d
jne 0x140046680
mov r9d, 1
add rdx, 2
cmp word [rdx], ax
je 0x14004667c
jmp 0x1400466a2
lea eax, [r8 - 0x30]
cmp ax, 9
ja 0x1400466e7
lea ecx, [rcx + rcx*4]
movzx eax, r8w
lea ecx, [rcx - 0x18]
add rdx, 2
lea ecx, [rax + rcx*2]
movzx r8d, word [rdx]
test r8w, r8w
jne 0x140046687
test r9d, r9d
je 0x1400466b3
neg ecx
movzx edx, cx
lea r9, [rbp - 0x38]
mov rcx, r10
lea r8, [rbp - 0x20]
call fcn.140046474
mov ebx, eax
test eax, eax
js 0x1400466e7
mov rcx, qword [rbp - 0x38]
call fcn.140046384
mov rcx, qword [rbp + 0x38]
mov rax, qword [rbp - 0x38]
mov qword [rcx], rax
jmp 0x1400466e7
mov ebx, 0xc000007a
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
pop rsi
pop rbp
ret