Function at 0x140004d50
Capabilities:
Access peb ldr_data
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0xa8
cmp dword [0x1400198f0], 0
je 0x140004d6a
mov eax, 1
jmp 0x140005023
mov rax, qword gs:[0x60]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx + rax + 8]
mov qword [rsp + 0x40], rax
jmp 0x140004dc9
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx + rax]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x30], 0
je 0x140004ea0
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
add rax, 0x88
mov qword [rsp + 0x80], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x80]
mov eax, dword [rcx + rax]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
jne 0x140004e41
jmp 0x140004db2
mov eax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax]
or eax, 0x20202020
cmp eax, 0x6c64746e
je 0x140004e85
jmp 0x140004db2
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
jne 0x140004e9b
jmp 0x140004ea0
jmp 0x140004db2
cmp qword [rsp + 0x30], 0
jne 0x140004eaf
xor eax, eax
jmp 0x140005023
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x18]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x90], rax
mov dword [rsp + 0x20], 0
lea rax, [0x1400198f8]
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x24]
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
movzx eax, word [rax]
cmp eax, 0x775a
jne 0x140004fed
mov rcx, qword [rsp + 0x58]
call fcn.140004980
mov ecx, dword [rsp + 0x20]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x48]
mov dword [rdx + rcx], eax
mov eax, dword [rsp + 0x24]
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x90]
movzx eax, word [rcx + rax*2]
mov ecx, dword [rsp + 0x20]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x98]
mov eax, dword [r8 + rax*4]
mov dword [rdx + rcx + 4], eax
mov eax, dword [rsp + 0x20]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx + rax + 4]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.140004a00
mov ecx, dword [rsp + 0x20]
imul rcx, rcx, 0x10
mov rdx, qword [rsp + 0x48]
mov qword [rdx + rcx + 8], rax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0x258
jne 0x140004fed
jmp 0x140005002
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
jne 0x140004f20
mov eax, dword [rsp + 0x20]
mov dword [0x1400198f0], eax
mov edx, dword [0x1400198f0]
lea rcx, [0x1400198f8]
call fcn.140004d20
mov eax, 1
add rsp, 0xa8
ret