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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov rax, qword [rdx]
mov bl, byte [rdx + 0x1c]
mov rdi, qword [rcx + 0x10]
mov r12d, dword [rax]
add dword [rcx + 0x54], 1
mov eax, dword [rdx + 8]
not ebx
mov r15, rcx
mov ecx, dword [rcx + 0x54]
and ebx, 1
mov r13d, r9d
mov rsi, rdx
lea ebp, [r12 + rbx]
mov dword [rsp + 0x88], ecx
mov dword [rsp + 0x80], eax
add ebp, dword [rsp + 0xa0]
cmp dword [rsp + 0xa8], 0
je 0x1400401cd
mov r14d, r9d
sub r14d, r12d
sub r14d, ebx
jmp 0x1400401d8
lea eax, [rcx + rbp]
lea r14d, [rcx + 1]
mov dword [r15 + 0x54], eax
mov rdx, qword [rdx]
mov r9b, 1
mov r8d, r14d
mov rcx, r15
call fcn.140027b90
test ebx, ebx
je 0x140040257
mov eax, dword [rsi + 0xc]
movsxd r13, dword [rdi + 0x3c]
mov dword [rsp + 0x20], eax
mov rax, qword [rdi + 0x30]
cmp dword [rax + 0x60], r13d
jg 0x140040213
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x14004024f
mov rcx, qword [rdi + 8]
add dword [rdi + 0x3c], 1
mov eax, dword [rsp + 0x20]
lea rdx, [r13 + r13*2]
mov dword [rcx + rdx*8 + 4], eax
lea eax, [r14 + r12]
mov byte [rcx + rdx*8], 0x4a
mov byte [rcx + rdx*8 + 3], 0
mov dword [rcx + rdx*8 + 0xc], 0
mov qword [rcx + rdx*8 + 0x10], 0
mov dword [rcx + rdx*8 + 8], eax
mov byte [rcx + rdx*8 + 1], 0
mov r13d, dword [rsp + 0x98]
cmp dword [rsp + 0xa8], 0
jne 0x14004027b
mov r9d, dword [rsp + 0xa0]
lea r8d, [r14 + r12]
mov edx, r13d
add r8d, ebx
mov rcx, r15
call fcn.140024e60
mov rax, qword [rdi + 0x30]
movsxd r13, dword [rdi + 0x3c]
cmp dword [rax + 0x60], r13d
jg 0x14004029a
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x1400402e0
add dword [rdi + 0x3c], 1
mov rcx, qword [rdi + 8]
mov r8d, dword [rsp + 0x80]
lea rdx, [r13 + r13*2]
lea eax, [r14 + r8]
sub ebp, r8d
mov dword [rcx + rdx*8 + 4], eax
mov eax, dword [rsp + 0x88]
mov dword [rcx + rdx*8 + 8], ebp
xor ebp, ebp
mov byte [rcx + rdx*8], 0x31
mov byte [rcx + rdx*8 + 3], 0
mov dword [rcx + rdx*8 + 0xc], eax
mov qword [rcx + rdx*8 + 0x10], rbp
mov byte [rcx + rdx*8 + 1], bpl
jmp 0x1400402ea
mov r8d, dword [rsp + 0x80]
xor ebp, ebp
test r8d, r8d
jle 0x1400406b1
mov ecx, dword [r15 + 0x54]
lea eax, [rcx + 1]
add ecx, dword [rsi + 8]
mov dword [rsp + 0xa8], eax
mov dword [r15 + 0x54], ecx
movsxd r13, dword [rdi + 0x3c]
mov eax, r12d
sub eax, dword [rsi + 8]
add eax, ebx
test ebx, ebx
mov dword [rsp + 0x20], eax
mov rax, qword [rdi + 0x30]
je 0x140040374
cmp dword [rax + 0x60], r13d
jg 0x140040342
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
je 0x140040342
mov r13d, 1
jmp 0x1400403c2
mov rcx, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rdx, [r13 + r13*2]
lea eax, [r14 + r12]
mov byte [rcx + rdx*8], 0x2e
mov byte [rcx + rdx*8 + 3], 0
mov dword [rcx + rdx*8 + 8], ebp
mov dword [rcx + rdx*8 + 0xc], ebp
mov qword [rcx + rdx*8 + 0x10], rbp
mov dword [rcx + rdx*8 + 4], eax
mov byte [rcx + rdx*8 + 1], 0
jmp 0x1400403c2
cmp dword [rax + 0x60], r13d
mov ebx, dword [rsi + 0xc]
jg 0x140040396
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
je 0x140040396
mov r13d, 1
jmp 0x1400403c2
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rcx, [r13 + r13*2]
mov byte [rax + rcx*8], 0x3b
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], ebx
mov dword [rax + rcx*8 + 8], ebp
mov dword [rax + rcx*8 + 0xc], ebp
mov qword [rax + rcx*8 + 0x10], rbp
mov byte [rax + rcx*8 + 1], 0
mov rax, qword [rdi + 0x30]
movsxd rbx, dword [rdi + 0x3c]
mov ebp, dword [rsi + 8]
cmp dword [rax + 0x60], ebx
jg 0x1400403e3
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x14004041a
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
mov edx, dword [rsp + 0xa8]
lea rcx, [rbx + rbx*2]
mov byte [rax + rcx*8], 0x2a
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], r14d
mov dword [rax + rcx*8 + 0xc], ebp
mov qword [rax + rcx*8 + 0x10], 0
mov byte [rax + rcx*8 + 1], 0
mov ecx, dword [rsi + 0x18]
test ecx, ecx
jns 0x140040427
mov ecx, dword [rdi + 0x3c]
sub ecx, 1
mov rax, qword [rdi]
cmp byte [rax + 0x51], 0
je 0x140040439
lea r12, [0x1400c20e0]
jmp 0x140040448
movsxd rax, ecx
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 8]
lea r12, [rax + rcx*8]
mov rax, qword [r15]
cmp byte [rax + 0x51], 0
jne 0x140040851
mov rbp, qword [r12 + 0x10]
mov eax, dword [rsp + 0x20]
mov ecx, dword [rsp + 0xa0]
add eax, ecx
xor edx, edx
mov dword [r12 + 8], eax
movzx r8d, word [rbp + 6]
mov rcx, qword [rbp + 0x18]
call sub.msvcrt.dll_memset
mov r8, qword [rdi + 8]
mov rcx, qword [rdi]
test r8, r8
mov qword [rsp + 0x20], r8
je 0x1400404c1
cmp byte [rcx + 0x51], 0
jne 0x1400404c1
mov eax, dword [rdi + 0x3c]
sub eax, 1
cdqe
lea rbx, [rax + rax*2]
movsx edx, byte [r8 + rbx*8 + 1]
mov r8, qword [r8 + rbx*8 + 0x10]
call fcn.1400255f0
mov r11, qword [rsp + 0x20]
mov qword [r11 + rbx*8 + 0x10], rbp
mov byte [r11 + rbx*8 + 1], 0xfa
jmp 0x1400404ce
mov r8, rbp
mov edx, 0xfffffffa
call fcn.1400255f0
movzx r9d, word [rbp + 8]
mov r8d, dword [rsp + 0x80]
mov rdx, qword [rsi]
sub r9d, 1
mov rcx, r15
call fcn.14003fff0
mov qword [r12 + 0x10], rax
movsxd rbx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
cmp dword [rax + 0x60], ebx
mov dword [rsp + 0xa0], ebx
jg 0x140040514
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x140040546
add dword [rdi + 0x3c], 1
mov rcx, qword [rdi + 8]
lea rdx, [rbx + rbx*2]
xor r8d, r8d
lea eax, [rbx + 1]
mov byte [rcx + rdx*8], 0x2b
mov byte [rcx + rdx*8 + 3], 0
mov dword [rcx + rdx*8 + 4], eax
mov dword [rcx + rdx*8 + 8], r8d
mov dword [rcx + rdx*8 + 0xc], eax
mov qword [rcx + rdx*8 + 0x10], r8
mov byte [rcx + rdx*8 + 1], r8b
mov rbp, qword [rdi + 0x30]
movsxd rbx, dword [rbp + 0x78]
lea eax, [rbx + 1]
mov dword [rbp + 0x78], eax
lea eax, [rbx - 1]
test ebx, eax
jne 0x14004057d
mov rdx, qword [rbp + 0x80]
mov rcx, qword [rbp]
lea eax, [rbx + rbx + 1]
movsxd r8, eax
shl r8, 2
call fcn.140022050
mov qword [rbp + 0x80], rax
mov rcx, qword [rbp + 0x80]
test rcx, rcx
je 0x140040590
mov dword [rcx + rbx*4], 0xffffffff
or eax, 0xffffffff
sub eax, ebx
mov dword [rsi + 0x14], eax
add dword [r15 + 0x54], 1
mov ebx, dword [r15 + 0x54]
mov r12d, dword [rsi + 0x14]
mov dword [rsi + 0x10], ebx
mov rax, qword [rdi + 0x30]
movsxd rbp, dword [rdi + 0x3c]
cmp dword [rax + 0x60], ebp
jg 0x1400405c6
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x1400405f9
add dword [rdi + 0x3c], 1
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp*2]
mov dword [rax + rcx*8 + 8], r12d
xor r12d, r12d
mov byte [rax + rcx*8], InitCommonControls
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], ebx
mov dword [rax + rcx*8 + 0xc], r12d
mov qword [rax + rcx*8 + 0x10], r12
mov byte [rax + rcx*8 + 1], r12b
jmp 0x1400405fc
xor r12d, r12d
mov rax, qword [rdi + 0x30]
movsxd rbx, dword [rdi + 0x3c]
mov ebp, dword [rsi + 0xc]
cmp dword [rax + 0x60], ebx
jg 0x14004061d
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x14004064a
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rcx, [rbx + rbx*2]
mov byte [rax + rcx*8], 0x78
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], ebp
mov dword [rax + rcx*8 + 8], r12d
mov dword [rax + rcx*8 + 0xc], r12d
mov qword [rax + rcx*8 + 0x10], r12
mov byte [rax + rcx*8 + 1], 0
mov r9d, dword [rdi + 0x3c]
cmp r9d, r13d
jbe 0x140040663
mov eax, r13d
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 8]
mov dword [rax + rcx*8 + 8], r9d
mov ecx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
mov r8d, dword [rsp + 0xa8]
sub ecx, 1
mov edx, r14d
mov dword [rax + 0x64], ecx
mov r9d, dword [rsi + 8]
mov rcx, r15
call fcn.140024e60
mov r11d, dword [rdi + 0x3c]
mov eax, dword [rsp + 0xa0]
cmp r11d, eax
jbe 0x1400406a4
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 8]
mov dword [rax + rcx*8 + 8], r11d
mov ecx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
sub ecx, 1
mov dword [rax + 0x64], ecx
movzx eax, byte [rsi + 0x1c]
movsxd rbp, dword [rdi + 0x3c]
mov r12d, dword [rsi + 0xc]
not al
movzx ebx, al
mov rax, qword [rdi + 0x30]
and ebx, 1
or ebx, 0x6e
cmp dword [rax + 0x60], ebp
jg 0x1400406e2
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x14004071b
add dword [rdi + 0x3c], 1
mov rax, qword [rdi + 8]
mov edx, dword [rsp + 0x88]
lea rcx, [rbp + rbp*2]
xor r13d, r13d
mov byte [rax + rcx*8], bl
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r13d
mov qword [rax + rcx*8 + 0x10], r13
mov byte [rax + rcx*8 + 1], r13b
jmp 0x14004071e
xor r13d, r13d
mov rax, qword [rsp + 0x90]
mov ebp, dword [rax + 0xc]
test ebp, ebp
je 0x140040851
mov eax, dword [rax + 0x10]
test eax, eax
je 0x14004073b
lea ebp, [rax + 1]
mov rax, qword [rdi + 0x30]
movsxd rbx, dword [rdi + 0x3c]
cmp dword [rax + 0x60], ebx
jg 0x140040760
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
je 0x140040760
mov ebx, 1
jmp 0x140040790
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rcx, [rbx + rbx*2]
mov byte [rax + rcx*8], 0x8c
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], ebp
mov dword [rax + rcx*8 + 8], r13d
mov dword [rax + rcx*8 + 0xc], 0xffffffff
mov qword [rax + rcx*8 + 0x10], r13
mov byte [rax + rcx*8 + 1], 0
mov rax, qword [rdi + 0x30]
movsxd rbp, dword [rdi + 0x3c]
mov r12d, dword [rsi + 0xc]
cmp dword [rax + 0x60], ebp
jg 0x1400407b2
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x1400407e1
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rcx, [rbp + rbp*2]
mov byte [rax + rcx*8], 0x6a
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], r13d
mov dword [rax + rcx*8 + 0xc], r13d
mov qword [rax + rcx*8 + 0x10], r13
mov byte [rax + rcx*8 + 1], 0
mov ebp, dword [rsi + 0xc]
mov rax, qword [rdi + 0x30]
movsxd rsi, dword [rdi + 0x3c]
cmp dword [rax + 0x60], esi
jg 0x140040802
mov edx, 1
mov rcx, rdi
call fcn.1400214c0
test eax, eax
jne 0x14004082f
mov rax, qword [rdi + 8]
add dword [rdi + 0x3c], 1
lea rcx, [rsi + rsi*2]
mov byte [rax + rcx*8], 0x62
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], ebp
mov dword [rax + rcx*8 + 8], r13d
mov dword [rax + rcx*8 + 0xc], r13d
mov qword [rax + rcx*8 + 0x10], r13
mov byte [rax + rcx*8 + 1], 0
mov edx, dword [rdi + 0x3c]
cmp edx, ebx
jbe 0x140040844
mov eax, ebx
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 8]
mov dword [rax + rcx*8 + 8], edx
mov ecx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
sub ecx, 1
mov dword [rax + 0x64], ecx
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret