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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov r13, qword [rcx]
mov r15, rcx
movzx eax, byte [rcx + 0x42]
mov rbx, qword [rcx + 8]
mov r12d, eax
sub r12, 1
mov qword [rsp + 0x90], r13
mov rsi, qword [r13]
mov rdi, qword [r13 + 0x10]
lea r14d, [rax - 1]
mov qword [rsp + 0x98], rsi
mov dword [rsp + 0x80], r14d
mov qword [rsp + 0x88], rbx
js 0x180050f65
imul rax, r12, 0x58
lea rbx, [rcx + 0x3cc]
add rbx, rax
cmp byte [rbx - 7], 0xaa
mov r13, qword [rbx + 0x14]
je 0x180050d3f
xor ebp, ebp
cmp byte [r15 + 0x47], 2
jne 0x180050ce1
movzx eax, byte [r15 + 0x42]
dec eax
cmp r14d, eax
jne 0x180050ce1
test dword [r13 + 0x28], 0x200
je 0x180050ce1
mov rax, qword [r13 + 0x20]
test byte [rax + 0x64], 0x80
je 0x180050ce1
movzx esi, word [r13 + 0x1e]
test esi, esi
je 0x180050ce1
mov rax, qword [rax + 0x10]
cmp word [rax + rsi*2], 0x24
jl 0x180050ce1
mov rax, qword [rsp + 0x90]
xor r14d, r14d
mov eax, dword [rax + 0x38]
lea ebp, [rax + 1]
test esi, esi
je 0x180050c89
mov r8d, dword [rbx - 0x2c]
lea eax, [r14 + rbp]
mov r9d, r14d
mov dword [rsp + 0x20], eax
mov edx, 0x5a
mov rcx, rdi
call fcn.18002495c
inc r14d
cmp r14d, esi
jl 0x180050c5a
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x38]
mov rcx, qword [rsp + 0x90]
inc eax
add eax, esi
mov dword [rsp + 0x28], esi
mov edx, Ordinal_27
mov dword [rsp + 0x20], ebp
mov dword [rcx + 0x38], eax
mov rcx, rdi
cmp byte [rbx - 7], 4
mov r8d, dword [rbx - 0x2c]
lea eax, [rdx - 3]
cmove edx, eax
xor r9d, r9d
call fcn.180024acc
and dword [rsp + 0x20], 0
mov edx, reloc.Cabinet.dll_FCIAddFile
mov r9d, dword [rbx]
mov rcx, rdi
mov ebp, eax
lea r8d, [rdx - 0xa]
call fcn.18002495c
mov r14d, dword [rsp + 0x80]
mov edx, dword [rbx - 0x1c]
mov rcx, rdi
call fcn.180024b7c
movzx ecx, byte [rbx - 6]
movzx edx, byte [rbx - 7]
mov r9d, dword [rbx]
mov r8d, dword [rbx - 4]
mov dword [rsp + 0x20], ecx
mov rcx, rdi
call fcn.18002495c
movsxd rax, dword [rdi + 0x90]
test eax, eax
jle 0x180050d26
movzx edx, byte [rbx - 5]
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 0x88]
mov word [rax + rcx*8 - 0x16], dx
test ebp, ebp
je 0x180050d4a
mov edx, ebp
mov rcx, rdi
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
jmp 0x180050d4a
mov edx, dword [rbx - 0x1c]
mov rcx, rdi
call fcn.180024b7c
test dword [r13 + 0x28], 0x800
je 0x180050e10
cmp dword [rbx + 4], 0
jle 0x180050e10
mov edx, dword [rbx - 0x24]
mov rcx, rdi
call fcn.180024b7c
mov ebp, dword [rbx + 4]
lea eax, [rbp - 1]
movsxd rcx, eax
mov rax, qword [rbx + 0xc]
lea rdx, [rcx + rcx*4]
lea rsi, [rax + rdx*4]
jmp 0x180050e08
mov edx, dword [rsi + 4]
mov rcx, rdi
inc edx
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov al, byte [rsi + 0x10]
cmp al, 0xaa
je 0x180050dec
mov ecx, dword [rsi + 0xc]
test ecx, ecx
je 0x180050dd5
mov r9d, dword [rdi + 0x90]
mov edx, reloc.WLDAP32.dll_Ordinal_26
mov eax, dword [rsi + 8]
add r9d, 2
mov r8d, dword [rbx - 0x2c]
mov dword [rsp + 0x28], ecx
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.180024acc
mov al, byte [rsi + 0x10]
and dword [rsp + 0x20], 0
mov rcx, rdi
mov r9d, dword [rsi + 4]
mov r8d, dword [rsi]
movzx edx, al
call fcn.18002495c
mov edx, dword [rsi + 4]
mov rcx, rdi
dec edx
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
dec ebp
sub rsi, 0x14
mov dword [rax + 8], ecx
test ebp, ebp
jg 0x180050d87
mov edx, dword [rbx - 0x28]
mov rcx, rdi
call fcn.180024b7c
mov r9d, dword [rbx - 0x20]
test r9d, r9d
je 0x180050e63
and dword [rsp + 0x20], 0
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 0xb]
call fcn.18002495c
mov edx, dword [rbx - 0x20]
mov rcx, rdi
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov rcx, rdi
mov edx, dword [rbx - 0x20]
sub edx, 2
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov r9d, dword [rbx - 0xc]
test r9d, r9d
je 0x180050e85
mov r8d, dword [rbx - 0x10]
mov edx, 0x3a
and dword [rsp + 0x20], 0
mov rcx, rdi
shr r8d, 1
call fcn.18002495c
mov r8d, dword [rbx - 0x34]
test r8d, r8d
je 0x180050f34
mov esi, dword [r13 + 0x28]
xor r9d, r9d
and dword [rsp + 0x20], 0
mov rcx, rdi
lea edx, [r9 + 0x38]
call fcn.18002495c
mov ebp, eax
test sil, 0x40
jne 0x180050ecb
and dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rbx - 0x30]
mov edx, Ordinal_133
mov rcx, rdi
call fcn.18002495c
bt esi, 9
jb 0x180050ede
bt esi, 0xd
jae 0x180050ef7
cmp qword [rbx + 4], 0
je 0x180050ef7
and dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rbx - 0x2c]
mov edx, Ordinal_133
mov rcx, rdi
call fcn.18002495c
mov al, byte [rbx - 7]
cmp al, 0x42
jne 0x180050f04
mov r8d, dword [rbx - 4]
jmp 0x180050f07
xor r8d, r8d
mov r9d, dword [rbx - 0x18]
sub al, 0x42
neg al
mov rcx, rdi
sbb edx, edx
and dword [rsp + 0x20], 0
add edx, 0xc
call fcn.18002495c
mov edx, ebp
mov rcx, rdi
call fcn.180024f6c
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
dec r14d
sub rbx, 0x58
sub r12, 1
mov dword [rsp + 0x80], r14d
jns 0x180050be2
mov r13, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x98]
mov edx, dword [r15 + 0x38]
mov rcx, rdi
call fcn.180024b7c
xor r12d, r12d
mov r14d, r12d
cmp byte [r15 + 0x42], r12b
jbe 0x180051145
lea r9, [r15 + 0x3e0]
movzx eax, byte [r9 - 0x1c]
imul rcx, rax, 0x70
mov rax, qword [r9]
test byte [rcx + rbx + 0x48], 0x10
mov rbp, qword [rcx + rbx + 0x28]
je 0x18005101f
mov ebx, dword [rcx + rbx + 0x40]
mov r10, qword [r13 + 0x10]
mov edx, dword [r9 - 0x28]
mov rcx, r10
mov r11d, dword [r9 - 0x44]
call fcn.180024f6c
mov rcx, qword [r13]
cmp byte [rcx + 0x61], r12b
jne 0x180051120
mov ecx, dword [r10 + 0x90]
cmp dword [r9 - 0x28], ecx
jge 0x180051120
sub ecx, dword [r9 - 0x28]
lea rdx, [rax + 4]
mov r8d, ecx
cmp dword [rdx], r11d
jne 0x180051010
mov al, byte [rdx - 4]
cmp al, 0x5a
jne 0x180051001
mov ecx, dword [rdx + 4]
mov eax, dword [rdx + 8]
add ecx, ebx
mov dword [rdx], ecx
mov byte [rdx - 4], 0x4e
mov dword [rdx + 4], eax
jmp 0x18005100c
cmp al, 0x80
jne 0x180051010
mov byte [rdx - 4], 0x49
mov dword [rdx], r12d
mov dword [rdx + 8], r12d
add rdx, 0x18
sub r8, 1
jne 0x180050fe2
jmp 0x180051120
test dword [rax + 0x28], 0x240
je 0x18005102e
mov r11, qword [rax + 0x20]
jmp 0x18005103f
test dword [rax + 0x28], 0x2000
je 0x180051128
mov r11, qword [r9 - 0x10]
test r11, r11
je 0x180051128
cmp byte [r15 + 0x45], r12b
je 0x18005105c
mov rax, qword [r11 + 0x18]
test byte [rax + 0x40], 0x20
je 0x180051128
cmp byte [rsi + 0x61], r12b
jne 0x180051128
mov edx, dword [r9 - 0x28]
mov rcx, rdi
mov r10d, dword [rdi + 0x90]
call fcn.180024f6c
cmp dword [r9 - 0x28], r10d
jge 0x180051128
sub r10d, dword [r9 - 0x28]
lea rdx, [rax + 4]
mov esi, r10d
mov eax, dword [r9 - 0x44]
cmp dword [rdx], eax
jne 0x180051112
mov al, byte [rdx - 4]
cmp al, 0x5a
jne 0x1800510fa
test byte [rbp + 0x40], 0x20
movsxd r10, dword [rdx + 4]
je 0x1800510c9
mov r8, qword [rbp + 0x10]
jmp 0x1800510bb
mov eax, dword [r8 + 0x64]
and al, 3
cmp al, 2
je 0x1800510c0
mov r8, qword [r8 + 0x28]
test r8, r8
jne 0x1800510ad
mov rax, qword [r8 + 8]
movsx r10d, word [rax + r10*2]
movzx r8d, word [r11 + 0x60]
mov ecx, r12d
test r8d, r8d
je 0x1800510eb
mov rbx, qword [r11 + 8]
movsxd rax, ecx
cmp r10w, word [rbx + rax*2]
je 0x1800510ee
inc ecx
cmp ecx, r8d
jl 0x1800510da
or ecx, 0xffffffff
movsx eax, cx
test eax, eax
js 0x180051112
mov dword [rdx + 4], eax
jmp 0x18005110c
cmp al, 0x80
jne 0x180051108
mov eax, dword [r9 - 0x40]
mov byte [rdx - 4], 0x87
jmp 0x180051110
cmp al, 0x15
jne 0x180051112
mov eax, dword [r9 - 0x40]
mov dword [rdx], eax
add rdx, 0x18
sub rsi, 1
jne 0x18005108e
mov rbx, qword [rsp + 0x88]
movzx eax, byte [r15 + 0x42]
inc r14d
mov rsi, qword [rsp + 0x98]
add r9, 0x58
cmp r14d, eax
jl 0x180050f88
mov eax, dword [r15 + 0x3c]
mov rdx, r15
mov rcx, qword [rsp + 0x98]
mov dword [r13 + 0xa4], eax
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.18004d50c