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

Disassembly:
sub esp, 0x70
mov eax, dword [0x1854370]
xor eax, esp
mov dword [esp + 0x6c], eax
push ebx
push ebp
mov ebp, ecx
push edi
mov edi, dword [ebp + 0x20]
xor ebx, ebx
cmp edi, ebx
je 0x165bf2e
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push esi
push edi
call ecx
mov dword [esp + 0x20], ebx
jmp 0x165bbe2
xor ebx, ebx
mov edx, dword [edi]
mov ecx, dword [edx + 0xc]
lea eax, [esp + 0x24]
push eax
push edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x34], ebx
call ecx
mov esi, dword [esp + 0x24]
test esi, esi
je 0x165be8d
movzx eax, word [esi + 0x30]
movzx edx, word [esi + 0x2e]
movzx ebx, word [esi + 0x2c]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x40], edx
cmp eax, 4
je 0x165bc28
cmp eax, 3
jne 0x165bf01
push 0x17ffb50
push esi
call 0x13bc2c0
add esp, 8
test eax, eax
jne 0x165bf01
push 0x17ffb70
push esi
call 0x13bc2c0
add esp, 8
test eax, eax
jne 0x165bf01
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x165be84
test byte [eax + 8], 4
je 0x165be84
push esi
lea ecx, [esp + 0x70]
call fcn.0164e3e0
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x74]
call fcn.0169b790
mov ecx, eax
call 0x12779a0
mov eax, dword [esp + 0x3c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165bca7
mov edx, dword [esp + 0x3c]
push edx
call fcn.01273020
add esp, 4
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x50]
call fcn.012a23b0
push 0xffffffffffffffff
push 0x17ff640
call fcn.012735b0
push 0xffffffffffffffff
push 0x17ff634
mov dword [esp + 0x2c], eax
call fcn.012735b0
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
mov ecx, esi
mov edx, 1
lock xadd dword [ecx], edx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
call fcn.01274620
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov ecx, 1
lock xadd dword [eax], ecx
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x1c]
call fcn.01274620
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x68]
push eax
lea ecx, [ebp + 0x30]
call fcn.012c50d0
mov ecx, eax
call fcn.012a1790
mov edx, dword [eax]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov dword [eax], ecx
mov eax, dword [esp + 0x30]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165bd5b
mov edx, dword [esp + 0x30]
push edx
call fcn.01273020
add esp, 4
lea ecx, [esp + 0x5c]
call fcn.012a03b0
mov eax, dword [esp + 0x18]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165bd7e
mov edx, dword [esp + 0x18]
push edx
call fcn.01273020
add esp, 4
mov eax, dword [esp + 0x14]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165bd98
mov edx, dword [esp + 0x14]
push edx
call fcn.01273020
add esp, 4
mov eax, esi
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165bdac
push esi
call fcn.01273020
add esp, 4
mov edx, dword [esp + 0x1c]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x165bdc6
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.01273020
add esp, 4
lea ecx, [esp + 0x4c]
call fcn.012a03b0
inc dword [esp + 0x20]
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x14]
call fcn.01274d20
mov ecx, dword [esp + 0x20]
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
push 0xa
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.01290490
push eax
lea eax, [esp + 0x38]
push 0x17ff808
push eax
call fcn.01267b21
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
add esp, 0x18
push esi
push edx
mov ecx, ebp
call fcn.01655740
mov eax, dword [esp + 0x28]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165be32
mov edx, dword [esp + 0x28]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x38]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165be4c
mov edx, dword [esp + 0x38]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x44]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165be66
mov edx, dword [esp + 0x44]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x10]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165be80
mov edx, dword [esp + 0x10]
push edx
call fcn.01273020
add esp, 4
mov esi, dword [esp + 0x24]
mov eax, dword [edi]
mov ecx, dword [eax + 0x4c]
push esi
push edi
call ecx
push ebx
push edi
mov ecx, ebp
call fcn.0165b120
mov ecx, dword [esp + 0x40]
push ecx
push edi
mov ecx, ebp
call fcn.01657a50
cmp word [esp + 0x2c], 0
mov edx, dword [edi]
je 0x165bf0c
mov ecx, dword [edx + 0x20]
lea eax, [esp + 0x48]
push eax
push 0
push edi
call ecx
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x38], 0
mov edx, dword [edi]
mov edx, dword [edx + 0x38]
push ecx
push edi
call edx
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, dword [esp + 0x34]
cmp edi, eax
je 0x165bf25
mov edi, eax
test eax, eax
jne 0x165bbe0
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.016664c7
add esp, 0x70
ret
mov edx, dword [edi]
mov eax, dword [edx + 0x4c]
push esi
push edi
call eax
jmp 0x165bea3
mov eax, dword [edx + 8]
push edi
call eax
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.016664c7
add esp, 0x70
ret
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
pop esi
mov ecx, dword [esp + 0x78]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.016664c7
add esp, 0x70
ret