Function at 0x140050c54
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 0x14005103d
imul rax, r12, 0x58
lea rbx, [rcx + 0x3cc]
add rbx, rax
cmp byte [rbx - 7], 0xaa
mov r13, qword [rbx + 0x14]
je 0x140050e17
xor ebp, ebp
cmp byte [r15 + 0x47], 2
jne 0x140050db9
movzx eax, byte [r15 + 0x42]
dec eax
cmp r14d, eax
jne 0x140050db9
test dword [r13 + 0x28], 0x200
je 0x140050db9
mov rax, qword [r13 + 0x20]
test byte [rax + 0x64], 0x80
je 0x140050db9
movzx esi, word [r13 + 0x1e]
test esi, esi
je 0x140050db9
mov rax, qword [rax + 0x10]
cmp word [rax + rsi*2], 0x24
jl 0x140050db9
mov rax, qword [rsp + 0x90]
xor r14d, r14d
mov eax, dword [rax + 0x38]
lea ebp, [rax + 1]
test esi, esi
je 0x140050d61
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.140024a34
inc r14d
cmp r14d, esi
jl 0x140050d32
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.140024ba4
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.140024a34
mov r14d, dword [rsp + 0x80]
mov edx, dword [rbx - 0x1c]
mov rcx, rdi
call fcn.140024c54
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.140024a34
movsxd rax, dword [rdi + 0x90]
test eax, eax
jle 0x140050dfe
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 0x140050e22
mov edx, ebp
mov rcx, rdi
call fcn.140025044
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
jmp 0x140050e22
mov edx, dword [rbx - 0x1c]
mov rcx, rdi
call fcn.140024c54
test dword [r13 + 0x28], 0x800
je 0x140050ee8
cmp dword [rbx + 4], 0
jle 0x140050ee8
mov edx, dword [rbx - 0x24]
mov rcx, rdi
call fcn.140024c54
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 0x140050ee0
mov edx, dword [rsi + 4]
mov rcx, rdi
inc edx
call fcn.140025044
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov al, byte [rsi + 0x10]
cmp al, 0xaa
je 0x140050ec4
mov ecx, dword [rsi + 0xc]
test ecx, ecx
je 0x140050ead
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.140024ba4
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.140024a34
mov edx, dword [rsi + 4]
mov rcx, rdi
dec edx
call fcn.140025044
mov ecx, dword [rdi + 0x90]
dec ebp
sub rsi, 0x14
mov dword [rax + 8], ecx
test ebp, ebp
jg 0x140050e5f
mov edx, dword [rbx - 0x28]
mov rcx, rdi
call fcn.140024c54
mov r9d, dword [rbx - 0x20]
test r9d, r9d
je 0x140050f3b
and dword [rsp + 0x20], 0
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 0xb]
call fcn.140024a34
mov edx, dword [rbx - 0x20]
mov rcx, rdi
call fcn.140025044
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov rcx, rdi
mov edx, dword [rbx - 0x20]
sub edx, 2
call fcn.140025044
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
mov r9d, dword [rbx - 0xc]
test r9d, r9d
je 0x140050f5d
mov r8d, dword [rbx - 0x10]
mov edx, Ordinal_59
and dword [rsp + 0x20], 0
mov rcx, rdi
shr r8d, 1
call fcn.140024a34
mov r8d, dword [rbx - 0x34]
test r8d, r8d
je 0x14005100c
mov esi, dword [r13 + 0x28]
xor r9d, r9d
and dword [rsp + 0x20], 0
mov rcx, rdi
lea edx, [r9 + 0x38]
call fcn.140024a34
mov ebp, eax
test sil, 0x40
jne 0x140050fa3
and dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rbx - 0x30]
mov edx, Ordinal_133
mov rcx, rdi
call fcn.140024a34
bt esi, 9
jb 0x140050fb6
bt esi, 0xd
jae 0x140050fcf
cmp qword [rbx + 4], 0
je 0x140050fcf
and dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rbx - 0x2c]
mov edx, Ordinal_133
mov rcx, rdi
call fcn.140024a34
mov al, byte [rbx - 7]
cmp al, 0x42
jne 0x140050fdc
mov r8d, dword [rbx - 4]
jmp 0x140050fdf
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.140024a34
mov edx, ebp
mov rcx, rdi
call fcn.140025044
mov ecx, dword [rdi + 0x90]
mov dword [rax + 8], ecx
dec r14d
sub rbx, 0x58
sub r12, 1
mov dword [rsp + 0x80], r14d
jns 0x140050cba
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.140024c54
xor r12d, r12d
mov r14d, r12d
cmp byte [r15 + 0x42], r12b
jbe 0x14005121d
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 0x1400510f7
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.140025044
mov rcx, qword [r13]
cmp byte [rcx + 0x61], r12b
jne 0x1400511f8
mov ecx, dword [r10 + 0x90]
cmp dword [r9 - 0x28], ecx
jge 0x1400511f8
sub ecx, dword [r9 - 0x28]
lea rdx, [rax + 4]
mov r8d, ecx
cmp dword [rdx], r11d
jne 0x1400510e8
mov al, byte [rdx - 4]
cmp al, 0x5a
jne 0x1400510d9
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 0x1400510e4
cmp al, 0x80
jne 0x1400510e8
mov byte [rdx - 4], 0x49
mov dword [rdx], r12d
mov dword [rdx + 8], r12d
add rdx, 0x18
sub r8, 1
jne 0x1400510ba
jmp 0x1400511f8
test dword [rax + 0x28], 0x240
je 0x140051106
mov r11, qword [rax + 0x20]
jmp 0x140051117
test dword [rax + 0x28], 0x2000
je 0x140051200
mov r11, qword [r9 - 0x10]
test r11, r11
je 0x140051200
cmp byte [r15 + 0x45], r12b
je 0x140051134
mov rax, qword [r11 + 0x18]
test byte [rax + 0x40], 0x20
je 0x140051200
cmp byte [rsi + 0x61], r12b
jne 0x140051200
mov edx, dword [r9 - 0x28]
mov rcx, rdi
mov r10d, dword [rdi + 0x90]
call fcn.140025044
cmp dword [r9 - 0x28], r10d
jge 0x140051200
sub r10d, dword [r9 - 0x28]
lea rdx, [rax + 4]
mov esi, r10d
mov eax, dword [r9 - 0x44]
cmp dword [rdx], eax
jne 0x1400511ea
mov al, byte [rdx - 4]
cmp al, 0x5a
jne 0x1400511d2
test byte [rbp + 0x40], 0x20
movsxd r10, dword [rdx + 4]
je 0x1400511a1
mov r8, qword [rbp + 0x10]
jmp 0x140051193
mov eax, dword [r8 + 0x64]
and al, 3
cmp al, 2
je 0x140051198
mov r8, qword [r8 + 0x28]
test r8, r8
jne 0x140051185
mov rax, qword [r8 + 8]
movsx r10d, word [rax + r10*2]
movzx r8d, word [r11 + 0x60]
mov ecx, r12d
test r8d, r8d
je 0x1400511c3
mov rbx, qword [r11 + 8]
movsxd rax, ecx
cmp r10w, word [rbx + rax*2]
je 0x1400511c6
inc ecx
cmp ecx, r8d
jl 0x1400511b2
or ecx, 0xffffffff
movsx eax, cx
test eax, eax
js 0x1400511ea
mov dword [rdx + 4], eax
jmp 0x1400511e4
cmp al, 0x80
jne 0x1400511e0
mov eax, dword [r9 - 0x40]
mov byte [rdx - 4], 0x87
jmp 0x1400511e8
cmp al, 0x15
jne 0x1400511ea
mov eax, dword [r9 - 0x40]
mov dword [rdx], eax
add rdx, 0x18
sub rsi, 1
jne 0x140051166
mov rbx, qword [rsp + 0x88]
movzx eax, byte [r15 + 0x42]
inc r14d
mov rsi, qword [rsp + 0x98]
add r9, 0x58
cmp r14d, eax
jl 0x140051060
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.14004d5e4