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

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x130
mov rsi, r8
mov r9, rdx
mov r13, rcx
test rdx, rdx
je 0x1400509ff
test r8, r8
je 0x1400509ff
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x1400509ff
movsxd rax, dword [rdx + 0x3c]
cmp dword [rax + rdx], 0x4550
jne 0x1400509ff
mov r15d, dword [rax + rdx + 0x88]
test r15d, r15d
je 0x1400509ff
mov r10d, dword [rax + rdx + 0x8c]
lea rdi, [rdx + r15]
xor edx, edx
mov dword [rsp + 0x168], r10d
mov r14d, 0xffffffff
cmp r8, 0xffff
ja 0x14005090f
sub esi, dword [rdi + 0x10]
cmp esi, dword [rdi + 0x14]
jae 0x1400509ff
mov eax, dword [rdi + 0x1c]
add rax, r9
mov r8d, dword [rax + rsi*4]
jmp 0x1400509c6
mov eax, dword [rdi + 0x18]
test eax, eax
je 0x1400509b3
mov qword [rsp + 0x170], r12
lea r11d, [rax - 1]
mov r12d, dword [rdi + 0x20]
mov ebx, edx
add r12, r9
test r11d, r11d
js 0x1400509ab
mov qword [rsp + 0x160], rbp
nop dword [rax]
lea r10d, [r11 + rbx]
mov r8, rsi
sar r10d, 1
mov eax, dword [r12 + r10*4]
add rax, r9
sub r8, rax
movzx ecx, byte [rax]
cmp cl, byte [rax + r8]
jne 0x140050968
inc rax
test cl, cl
jne 0x140050954
mov eax, edx
jmp 0x14005096d
sbb eax, eax
or eax, 1
cmp eax, 0xffffffff
je 0x140050992
test eax, eax
je 0x140050981
cmp eax, 1
jne 0x140050996
lea r11d, [r10 - 1]
jmp 0x140050996
mov ecx, dword [rdi + 0x24]
lea ebx, [r11 + 1]
add rcx, r9
movzx r14d, word [rcx + r10*2]
jmp 0x140050996
lea ebx, [r10 + 1]
cmp ebx, r11d
jle 0x140050940
mov rbp, qword [rsp + 0x160]
mov r10d, dword [rsp + 0x168]
mov r12, qword [rsp + 0x170]
cmp r14d, dword [rdi + 0x14]
jae 0x1400509ff
mov eax, dword [rdi + 0x1c]
add rax, r9
mov ecx, r14d
mov r8d, dword [rax + rcx*4]
test r8d, r8d
je 0x1400509ff
cmp r8d, r15d
jb 0x140050a86
lea eax, [r10 + r15]
cmp r8d, eax
jae 0x140050a86
add r8, r9
mov rbx, r8
movzx eax, byte [r8]
test al, al
je 0x1400509ff
nop
cmp al, 0x2e
je 0x140050a19
movzx eax, byte [rbx + 1]
inc rbx
test al, al
jne 0x1400509f0
xor eax, eax
mov rbx, qword [rsp + 0x178]
add rsp, 0x130
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret
mov rcx, rbx
sub rcx, r8
cmp rcx, 0x104
jae 0x1400509ff
test rcx, rcx
je 0x140050a45
nop dword [rax]
movzx eax, byte [r8 + rdx]
test al, al
je 0x140050a45
mov byte [rsp + rdx + 0x20], al
inc rdx
cmp rdx, rcx
jb 0x140050a30
mov byte [rsp + rdx + 0x20], 0
mov rcx, r13
lea rdx, [rsp + 0x20]
call fcn.14004fd70
mov rdi, rax
test rax, rax
je 0x1400509ff
cmp byte [rbx + 1], 0x23
lea r8, [rbx + 1]
jne 0x140050a76
lea rcx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
movsxd r8, eax
mov rdx, rdi
mov rcx, r13
call 0x140050870
jmp 0x140050a01
mov eax, r8d
add rax, r9
jmp 0x140050a01
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov rax, qword gs:[0x60]
mov rbp, r8
mov rsi, rdx
mov r14, rcx
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop dword [rax]
nop dword [rax + rax]
mov r10, qword [rax + 0x30]
movsxd r9, dword [r10 + 0x3c]
mov ebx, dword [r9 + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x140050bf7
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x140050bf7
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0xf952929d
lea rcx, [rdi + r9*4]
mov edx, dword [rcx + r10]
add rdx, r10
movzx ecx, byte [rdx]
inc rdx
test cl, cl
je 0x140050bf2
nop
movsx ecx, cl
lea rdx, [rdx + 1]
xor ecx, r8d
imul r8d, ecx, 0x1000193
movzx ecx, byte [rdx - 1]
test cl, cl
jne 0x140050bd0
cmp r8d, 0xa2e0bd74
je 0x140050bfc
test r9d, r9d
jne 0x140050bb0
mov rax, qword [rax]
jmp 0x140050b80
mov ecx, dword [rbx + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
mov rcx, rsi
add rax, r10
call rax
test rax, rax
jne 0x140050cd8
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop dword [rax]
nop word [rax + rax]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov ebx, dword [rcx + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x140050cb7
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x140050cb7
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0xc2bbec36
lea rcx, [rdi + r9*4]
mov ecx, dword [rcx + r10]
add rcx, r10
movzx edx, byte [rcx]
inc rcx
test dl, dl
je 0x140050cb2
nop
movsx edx, dl
lea rcx, [rcx + 1]
xor edx, r8d
imul r8d, edx, 0x1000193
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x140050c90
cmp r8d, 0xfc328078
je 0x140050cbc
test r9d, r9d
jne 0x140050c70
mov rax, qword [rax]
jmp 0x140050c40
mov ecx, dword [rbx + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
mov rcx, rsi
add rax, r10
call rax
mov r8, rbp
mov rdx, rax
mov rcx, r14
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp 0x140050870