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

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [rcx + 0x20]
mov qword [rsp + 0x68], rsi
mov rsi, rcx
mov qword [rsp + 0x50], r13
mov r13d, edx
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x1400404e9
call qword [0x1401b4498]
mov rcx, qword [rsi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x140040501
inc dword [rcx + 0x14]
cmp byte [rcx + 0x12], 0
jne 0x140040501
call fcn.140033c80
mov rdx, qword [rsi]
test rdx, rdx
je 0x14004051b
mov rcx, qword [rdx + 0x18]
test rcx, rcx
je 0x14004051b
call qword [0x1401b4498]
mov rdx, qword [rsi]
mov ebx, dword [rsi + 0x30]
test ebx, ebx
je 0x14004052e
lea eax, [rbx - 5]
cmp eax, 1
ja 0x140040bc7
mov rcx, qword [rsi + 0x28]
mov qword [rsp + 0x60], rdi
mov rdi, qword [rsi + 8]
mov qword [rsp + 0x58], r12
mov r8, qword [rcx + 8]
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x20], 0
mov rax, qword [r8]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 8]
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
test rdx, rdx
je 0x14004057d
cmp byte [r8 + 0x24], 2
jne 0x14004057d
mov ebx, 5
jmp 0x14004059d
xor ebx, ebx
cmp byte [rcx + 0x10], bl
jne 0x14004059d
xor edx, edx
call fcn.140036cb0
mov rcx, qword [rsi + 0x28]
mov ebx, eax
mov rdi, qword [rsi + 8]
mov dword [rsp + 0x20], 1
cmp dword [rsi + 0x14], 0
mov qword [rsp + 0x88], rbp
jne 0x140040682
test ebx, ebx
jne 0x1400406e8
mov rax, qword [rcx + 8]
mov r14, qword [rdi + 8]
mov ebp, dword [rax + 0x30]
cmp byte [rdi + 0x11], bl
je 0x1400405d7
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], bl
jne 0x1400405d7
mov rcx, rdi
call fcn.140033c80
test byte [r14 + 0x26], 2
je 0x1400405ff
cmp byte [rdi + 0x11], 0
je 0x140040686
sub dword [rdi + 0x14], 1
jne 0x140040686
mov rcx, rdi
call fcn.140033c50
jmp 0x140040686
mov r12d, dword [r14 + 0x30]
lea eax, [rbp - 0x200]
sub r12d, dword [r14 + 0x34]
cmp eax, 0xfe00
ja 0x140040646
lea eax, [rbp - 1]
test ebp, eax
jne 0x140040646
mov rcx, qword [r14 + 0x80]
mov dword [r14 + 0x30], ebp
test rcx, rcx
je 0x140040646
add rcx, 0xfffffffffffffffc
mov qword [r14 + 0x80], rcx
call fcn.140029890
mov qword [r14 + 0x80], 0
mov rcx, qword [r14]
lea rdx, [r14 + 0x30]
mov r8d, r12d
call fcn.14002d1d0
mov ecx, dword [r14 + 0x30]
mov ebp, eax
movzx eax, r12w
sub ecx, eax
mov dword [r14 + 0x34], ecx
cmp byte [rdi + 0x11], 0
je 0x140040679
sub dword [rdi + 0x14], 1
jne 0x140040679
mov rcx, rdi
call fcn.140033c50
cmp ebp, 7
jne 0x140040686
mov ebx, ebp
jmp 0x1400406e8
test ebx, ebx
jne 0x1400406e8
cmp dword [rsi + 0x14], 0
jne 0x1400406e8
mov rcx, qword [rsi + 8]
mov edx, 2
call fcn.140036cb0
mov ebx, eax
test eax, eax
jne 0x1400406e8
mov rdi, qword [rsi + 8]
mov dword [rsi + 0x14], 1
mov rbp, qword [rdi + 8]
cmp byte [rdi + 0x11], al
je 0x1400406c4
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], al
jne 0x1400406c4
mov rcx, rdi
call fcn.140033c80
mov rax, qword [rbp + 0x18]
mov rdx, qword [rax + 0x50]
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [rsi + 0x10], eax
cmp byte [rdi + 0x11], 0
je 0x1400406e8
sub dword [rdi + 0x14], 1
jne 0x1400406e8
mov rcx, rdi
call fcn.140033c50
mov rax, qword [rsi + 0x28]
mov r12, qword [rax + 8]
mov rax, qword [rsi + 8]
mov ecx, dword [r12 + 0x30]
mov rax, qword [rax + 8]
mov dword [rsp + 0x90], ecx
mov edx, dword [rax + 0x30]
mov rax, qword [rax]
mov dword [rsp + 0x98], edx
movzx eax, byte [rax + 9]
mov byte [rsp + 0x80], al
test ebx, ebx
jne 0x14004072e
cmp al, 5
jne 0x14004072e
cmp ecx, edx
mov eax, 8
cmovne ebx, eax
mov r12d, dword [r12 + 0x3c]
lea r14, [rsi + 0x18]
xor r15d, r15d
nop word [rax + rax]
test r13d, r13d
js 0x14004074a
cmp r15d, r13d
jge 0x1400407ba
mov ebp, dword [rsi + 0x18]
lea r14, [rsi + 0x18]
cmp ebp, r12d
ja 0x1400407ba
test ebx, ebx
jne 0x1400407fe
mov rax, qword [rsi + 0x28]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp ebp, eax
je 0x1400407b2
mov rcx, qword [rsp + 0x30]
lea r9d, [rbx + 2]
lea r8, [rsp + 0x38]
mov edx, ebp
call fcn.14002ecf0
mov ebx, eax
test eax, eax
jne 0x1400407b2
mov rdi, qword [rsp + 0x38]
xor r9d, r9d
mov edx, ebp
mov rcx, rsi
mov r8, qword [rdi + 8]
call fcn.140040330
mov rcx, rdi
mov ebx, eax
call fcn.14002f370
inc dword [r14]
inc r15d
jmp 0x140040740
test ebx, ebx
jne 0x1400407fe
mov eax, r12d
mov dword [rsi + 0x38], r12d
sub eax, dword [r14]
inc eax
mov dword [rsi + 0x34], eax
cmp dword [r14], r12d
ja 0x140040807
cmp dword [rsi + 0x3c], ebx
jne 0x140040b7d
mov rax, qword [rsi + 0x28]
mov rcx, qword [rax + 8]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x70]
mov qword [rsi + 0x40], rax
mov qword [rdx + 0x70], rsi
mov dword [rsi + 0x3c], 1
jmp 0x140040b7d
cmp ebx, 0x65
jne 0x140040b7d
test r12d, r12d
jne 0x140040864
mov rdi, qword [rsi + 8]
cmp byte [rdi + 0x11], r12b
je 0x140040827
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], r12b
jne 0x140040827
mov rcx, rdi
call fcn.140033c80
mov rax, qword [rdi + 8]
mov dword [rax + 0x3c], 0
mov rcx, qword [rdi + 8]
call fcn.140036be0
cmp byte [rdi + 0x11], 0
mov ebx, eax
je 0x140040851
sub dword [rdi + 0x14], 1
jne 0x140040851
mov rcx, rdi
call fcn.140033c50
mov r12d, 1
test ebx, ebx
je 0x140040864
cmp ebx, 0x65
jne 0x140040b7d
mov rdi, qword [rsi + 8]
mov ebp, dword [rsi + 0x10]
inc ebp
cmp byte [rdi + 0x11], 0
mov rbx, qword [rdi + 8]
je 0x140040888
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x140040888
mov rcx, rdi
call fcn.140033c80
mov rcx, qword [rbx + 0x18]
mov r14, qword [rcx + 0x50]
mov rcx, qword [rcx + 0x70]
call fcn.14002fce0
mov ebx, eax
test eax, eax
jne 0x1400408a5
bswap ebp
mov dword [r14 + 0x28], ebp
cmp byte [rdi + 0x11], 0
je 0x1400408b9
sub dword [rdi + 0x14], 1
jne 0x1400408b9
mov rcx, rdi
call fcn.140033c50
test ebx, ebx
jne 0x140040b7d
mov rcx, qword [rsi]
test rcx, rcx
je 0x1400408ce
call fcn.14006b9f0
cmp byte [rsp + 0x80], 5
jne 0x140040953
mov rbx, qword [rsi + 8]
mov r15d, 0xffef
xor edx, edx
mov rcx, rbx
mov rdi, qword [rbx + 8]
and word [rdi + 0x26], r15w
call fcn.140036cb0
mov ecx, eax
test eax, eax
jne 0x140040944
mov rax, qword [rdi + 0x18]
mov rbp, qword [rax + 0x50]
cmp byte [rbp + 0x12], 2
jne 0x14004090f
cmp byte [rbp + 0x13], 2
je 0x140040944
mov edx, 2
mov rcx, rbx
call fcn.140036cb0
mov ecx, eax
test eax, eax
jne 0x140040944
mov rcx, qword [rdi + 0x18]
mov rcx, qword [rcx + 0x70]
call fcn.14002fce0
mov ecx, eax
mov ebx, eax
test eax, eax
jne 0x140040944
mov word [rbp + 0x12], 0x202
and word [rdi + 0x26], r15w
jmp 0x140040953
and word [rdi + 0x26], r15w
mov ebx, ecx
test ecx, ecx
jne 0x140040b7d
movsxd r9, dword [rsp + 0x90]
mov ecx, dword [rsp + 0x98]
cmp r9d, ecx
jge 0x140040b44
mov rbp, qword [rsp + 0x28]
mov eax, ecx
cdq
mov r13, r9
idiv r9d
mov r14, qword [rbp + 0x48]
mov r15d, dword [rbp + 0x20]
mov ecx, eax
dec eax
add eax, r12d
movsxd r12, r12d
cdq
idiv ecx
xor edx, edx
mov r8d, eax
mov rax, qword [rsi + 8]
mov rcx, qword [rax + 8]
lea edi, [r8 - 1]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp r8d, eax
cmovne edi, r8d
imul r12, r9
cmp edi, r15d
ja 0x140040a1d
mov rax, qword [rsi + 8]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp edi, eax
je 0x140040a12
xor r9d, r9d
lea r8, [rsp + 0x80]
mov edx, edi
mov rcx, rbp
call fcn.14002ecf0
mov ebx, eax
test eax, eax
jne 0x140040a12
mov rbp, qword [rsp + 0x80]
mov rcx, rbp
call fcn.14002fce0
mov ebx, eax
test rbp, rbp
je 0x140040a0d
mov rcx, rbp
call fcn.14002f370
mov rbp, qword [rsp + 0x28]
inc edi
test ebx, ebx
je 0x1400409b5
jmp 0x140040b7d
test ebx, ebx
jne 0x140040a31
xor edx, edx
lea r8d, [rbx + 1]
mov rcx, rbp
call fcn.14002fdd0
mov ebx, eax
mov eax, dword [rsp + 0x98]
add eax, dword [0x1401b3448]
movsxd r15, eax
mov eax, dword [rsp + 0x90]
cmp r15, r12
cmovge r15, r12
add eax, dword [0x1401b3448]
movsxd rdi, eax
test ebx, ebx
jne 0x140040b7d
cmp rdi, r15
jge 0x140040ad2
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x80]
mov rax, rdi
mov qword [rsp + 0x80], 0
cqo
xor r9d, r9d
idiv r13
lea edx, [rax + 1]
call fcn.14002ecf0
mov rbp, qword [rsp + 0x80]
mov ebx, eax
test eax, eax
jne 0x140040ab9
mov rax, qword [r14]
mov r9, rdi
mov r8d, dword [rsp + 0x90]
mov rcx, r14
mov rdx, qword [rbp + 8]
call qword [rax + Ordinal_26]
mov ebx, eax
test rbp, rbp
je 0x140040ac6
mov rcx, rbp
call fcn.14002f370
add rdi, r13
test ebx, ebx
je 0x140040a60
jmp 0x140040b7d
mov rax, qword [r14]
lea rdx, [rsp + 0x80]
mov rcx, r14
call qword [rax + Ordinal_50]
mov ebx, eax
test eax, eax
jne 0x140040b01
cmp qword [rsp + 0x80], r12
jle 0x140040b01
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + reloc.WLDAP32.dll_Ordinal_32]
mov ebx, eax
test ebx, ebx
jne 0x140040b7d
mov rbp, qword [rsp + 0x28]
mov rcx, qword [rbp + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x140040b2e
xor r8d, r8d
lea edx, [rbx + 0x15]
call qword [rax + 0x50]
mov ebx, eax
cmp eax, 0xc
jne 0x140040b2a
xor ebx, ebx
jmp 0x140040b2e
test eax, eax
jne 0x140040b62
cmp byte [rbp + 0xb], 0
jne 0x140040b62
mov rcx, qword [rbp + 0x48]
movzx edx, byte [rbp + 0x10]
mov rax, qword [rcx]
call qword [rax + Ordinal_41]
jmp 0x140040b60
mov eax, r9d
xor r8d, r8d
cdq
idiv ecx
mov rcx, qword [rsp + 0x28]
xor edx, edx
imul eax, r12d
mov dword [rcx + 0x20], eax
call fcn.14002fdd0
mov ebx, eax
test ebx, ebx
jne 0x140040b7d
mov rcx, qword [rsi + 8]
xor edx, edx
call fcn.140037e20
mov ebx, eax
mov eax, 0x65
test ebx, ebx
cmove ebx, eax
cmp dword [rsp + 0x20], 0
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x88]
je 0x140040bb6
mov rcx, qword [rsi + 0x28]
xor edx, edx
call fcn.140037be0
mov rcx, qword [rsi + 0x28]
xor edx, edx
call fcn.140037e20
cmp ebx, 0xc0a
mov eax, 7
cmove ebx, eax
mov dword [rsi + 0x30], ebx
mov rax, qword [rsi]
mov r13, qword [rsp + 0x50]
test rax, rax
je 0x140040be3
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140040be3
call qword [0x1401b44a8]
mov rcx, qword [rsi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x140040bf8
sub dword [rcx + 0x14], 1
jne 0x140040bf8
call fcn.140033c50
mov rcx, qword [rsi + 0x20]
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rcx + 0x18]
test rcx, rcx
je 0x140040c10
call qword [0x1401b44a8]
mov eax, ebx
add rsp, 0x70
pop rbx
ret