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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xd0
mov esi, esp
mov dword [esi + 0xb8], ebp
movzx eax, byte [ebp + 0x18]
mov dword [esi + 0xbc], esp
mov dword [esi + 0xc8], 0xffffffff
mov dword [esi + 0xc4], 0x10165650
mov ecx, dword fs:[0]
mov edx, eax
mov dword [esi + 0xb0], eax
lea eax, [esi + 0xc0]
mov dword [esi + 0xc0], ecx
mov dword fs:[0], eax
xor eax, eax
test dl, 1
mov ecx, 0x89
mov byte [esi + 0x13], dl
cmove ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0xac], ecx
mov cl, 1
mov edx, dword [eax]
lea eax, [edx + 0xc]
lea ebx, [edx + 0x10]
mov dword [esi + 0xb4], eax
xor eax, eax
lock cmpxchg byte [edx + 0x10], cl
mov dword [esi + 0xc], edx
jne 0x10164ef8
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
jne 0x10164f16
xor eax, eax
movzx ecx, byte [edx + 0x11]
test cl, cl
jne 0x10164f2c
mov dword [esi + 0x18], ebx
mov byte [esi + 0x1c], al
mov dword [esi + 4], eax
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x10164a3e
mov ecx, dword [edx + 0x18]
mov eax, dword [ecx + eax*4 - 4]
mov eax, dword [eax]
cmp eax, 0x21
jb 0x10164a69
lea eax, [edx + 0x14]
mov edx, dword [edx + 0xc]
mov dword [esi + 8], ebx
mov dword [esi + 0xc8], 1
lea ecx, [esi + 0x30]
push eax
call fcn.10164810
add esp, 4
jmp 0x10164a5d
lea eax, [edx + 0x14]
mov edx, dword [edx + 0xc]
mov dword [esi + 8], ebx
mov dword [esi + 0xc8], 1
lea ecx, [esi + 0x30]
push eax
call fcn.10164810
add esp, 4
cmp byte [esi + 0x30], 4
mov edx, dword [esi + 0xc]
jne 0x10164abd
mov ebx, dword [esi + 8]
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x10165009
mov ecx, dword [edx + 0x18]
mov edx, dword [ecx + eax*4 - 4]
lock inc dword [edx]
jle 0x101650cc
cmp byte [esi + 4], 0
jne 0x10164a9c
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
jne 0x10164f9e
xor eax, eax
xchg byte [ebx], al
cmp al, 2
jne 0x10164afb
mov dword [esi + 0xc8], 0xffffffff
push ebx
mov edi, edx
call fcn.101cb780
mov edx, edi
add esp, 4
jmp 0x10164afb
mov edi, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
mov ebx, edi
shrd ebx, edx, 8
cmp byte [esi + 4], 0
jne 0x10164ae1
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
jne 0x10164fc5
mov ecx, dword [esi + 8]
xor eax, eax
xchg byte [ecx], al
cmp al, 2
je 0x10164f75
mov ecx, edi
cmp cl, 4
jne 0x10164ec7
lea ebx, [esi + 0x30]
lea edi, [esi + 0x20]
mov dword [esi + 4], edx
mov dword [esi + 0x18], edx
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], 0
push 0
push 0
push ebx
push 4
push edi
push 0
push 0
push 0x48000022
push dword [ebp + 0x10]
call dword [sym.imp.ws2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
je 0x10164d51
mov eax, dword [esi + 0x20]
xorps xmm0, xmm0
mov ecx, dword [esi + 4]
movsd qword [esi + 0x9a], xmm0
movsd qword [esi + 0xa2], xmm0
movsd qword [esi + 0x68], xmm0
movsd qword [esi + 0x60], xmm0
movsd qword [esi + 0x58], xmm0
movsd qword [esi + 0x50], xmm0
movsd qword [esi + 0x80], xmm0
mov word [esi + 0x88], 0
mov dword [esi + 0x30], 1
mov dword [esi + 0x34], 1
mov word [esi + 0x38], 0
movsd qword [esi + 0x48], xmm0
movsd xmm0, qword [esi + 0x94]
movsd xmm1, qword [esi + 0x9c]
movsd qword [esi + 0x3a], xmm0
movsd qword [esi + 0x42], xmm1
mov dword [esi + 0x74], 0
mov dword [esi + 0x70], 0
mov dword [esi + 0x78], ecx
mov dword [esi + 0x7c], eax
movzx eax, byte [0x10284b09]
push 8
push 0x60
call fcn.10013450
add esp, 8
test eax, eax
je 0x10164fee
mov ebx, eax
push 0x60
lea edi, [esi + 0x30]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, ebx
mov dword [esi + 0x14], ebx
mov cl, 1
xor eax, eax
add ebx, 8
mov dword [esi + 8], edx
lock cmpxchg byte [edx + 8], cl
mov dword [esi + 4], ebx
je 0x10164c1b
mov dword [esi + 0xc8], 3
push ebx
call fcn.101cb6e0
mov ebx, dword [esi + 4]
lea edi, [esi + 0x30]
add esp, 4
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
je 0x10164d9f
mov dword [esi + 0xc8], 3
call fcn.101cb650
mov ebx, dword [esi + 4]
lea edi, [esi + 0x30]
mov edx, edi
xor al, 1
mov edi, dword [esi + 8]
movzx ecx, byte [edi + 9]
test cl, cl
jne 0x10164db2
mov ecx, dword [esi + 0xb0]
mov edx, dword [esi + 0xac]
add ecx, ecx
and ecx, 4
test al, al
lea ecx, [edx + ecx + 0x110]
mov dword [edi + 0x50], ecx
mov ecx, dword [ebp + 0x14]
mov dword [edi + 0x44], 0
mov dword [edi + 0x40], ecx
jne 0x10164caf
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
je 0x10164caf
mov dword [esi + 0xc8], 3
call fcn.101cb650
mov ecx, dword [ebp + 0x14]
mov ebx, dword [esi + 4]
test al, al
jne 0x10164caf
mov eax, dword [esi + 8]
mov byte [eax + 9], 1
xor eax, eax
xchg byte [ebx], al
cmp al, 2
jne 0x10164ccd
mov dword [esi + 0xc8], 3
push ebx
call fcn.101cb780
mov ecx, dword [ebp + 0x14]
add esp, 4
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x14]
lock inc dword [eax]
jle 0x101650cc
lock inc dword [edx]
jle 0x101650cc
mov edi, dword [esi + 0xc]
movzx eax, byte [esi + 0x13]
mov dword [esi + 0xc8], 5
mov dword [esi + 0x30], edi
mov dword [esi + 0x38], ecx
lea ecx, [edi + 8]
mov byte [esi + 0x3c], al
mov dword [esi + 0x34], edx
mov dword [esi + 4], ecx
call fcn.10165390
mov eax, dword [esi + 0xc]
mov ebx, dword [ebp + 8]
movzx eax, byte [eax + 0x34]
test al, al
je 0x10164d39
mov edx, dword [esi + 4]
lea ecx, [esi + 0x94]
call fcn.10163f50
cmp byte [esi + 0x94], 4
mov ebx, dword [ebp + 8]
jne 0x10164de1
movsd xmm0, qword [esi + 0x30]
movsd xmm1, qword [esi + 0x38]
movsd qword [ebx + 8], xmm1
movsd qword [ebx], xmm0
jmp 0x10164ee2
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [esi + 8], eax
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], 0
push 0
push 0
push ebx
push 4
mov ebx, edi
push edi
push 0
push 0
push 0x4800001c
mov edi, dword [ebp + 0x10]
push edi
call dword [sym.imp.ws2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
mov ecx, edi
je 0x10164e10
mov eax, dword [esi + 0x20]
mov edi, ebx
cmp eax, ecx
jne 0x10164b3b
jmp 0x10164e1c
mov edx, edi
xor eax, eax
mov edi, dword [esi + 8]
movzx ecx, byte [edi + 9]
test cl, cl
je 0x10164c55
mov dword [esi + 0x30], ebx
mov byte [esi + 0x34], al
mov dword [esi + 0xc8], 4
push 0x1020d460
push 0x1020d284
push edx
push 0x2b
push 0x1020d248
call fcn.101cc840
add esp, 0x14
jmp 0x101650cc
mov ecx, dword [esi + 0x98]
mov eax, dword [esi + 0x94]
mov dword [esi + 0xc8], 0xffffffff
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x30]
mov dword [ebx + 4], eax
mov dword [ebx], 0
call fcn.10163000
jmp 0x10164ee2
mov edi, ecx
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ecx, edi
mov edi, ebx
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], 0
push 0
push 0
lea eax, [esi + 0x30]
push eax
push 4
push edi
push 0
push 0
push 0x4800001d
push ecx
mov ebx, ecx
call dword [sym.imp.ws2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
je 0x10164e5b
mov eax, dword [esi + 0x20]
mov ecx, ebx
cmp eax, ebx
jne 0x10164b3b
jmp 0x10164e63
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ecx, ebx
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], 0
push 0
push 0
lea eax, [esi + 0x30]
push eax
push 4
push edi
push 0
push 0
push 0x4800001b
push ecx
mov edi, ecx
call dword [sym.imp.ws2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
je 0x10164f5e
mov eax, dword [esi + 0x20]
cmp eax, edi
jne 0x10164b3b
mov eax, dword [esi + 4]
lock dec dword [eax]
jne 0x10164ec0
lea eax, [esi + 0x18]
mov dword [esi + 0xc8], 0xffffffff
push eax
call fcn.10006990
add esp, 4
mov edx, dword [esi + 8]
xor ebx, ebx
xor ecx, ecx
mov eax, dword [ebp + 8]
mov byte [eax + 4], cl
mov word [eax + 5], bx
shr ebx, 0x10
mov byte [eax + 7], bl
mov dword [eax + 8], edx
mov ebx, eax
mov dword [eax], 0
mov eax, dword [esi + 0xc0]
mov dword fs:[0], eax
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push ebx
call fcn.101cb6e0
mov edx, dword [esi + 0xc]
add esp, 4
mov eax, dword [0x10284a20]
mov eax, dword [eax]
test eax, 0x7fffffff
je 0x101649f1
call fcn.101cb650
mov edx, dword [esi + 0xc]
xor al, 1
movzx ecx, byte [edx + 0x11]
test cl, cl
je 0x101649ff
mov dword [esi + 0x30], ebx
mov byte [esi + 0x34], al
mov dword [esi + 0xc8], 0
lea eax, [esi + 0x30]
push 0x1020d3e4
push 0x1020d238
push eax
push 0x2b
push 0x1020d248
call fcn.101cc840
add esp, 0x14
jmp 0x101650cc
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov eax, dword [esi + 4]
lock dec dword [eax]
je 0x10164eaa
jmp 0x10164ec0
mov dword [esi + 0xc8], 0xffffffff
push ecx
mov dword [esi + 4], edx
call fcn.101cb780
mov edx, dword [esi + 4]
add esp, 4
mov ecx, edi
cmp cl, 4
je 0x10164afb
jmp 0x10164ec7
mov dword [esi + 0xc8], 0xffffffff
mov edi, edx
call fcn.101cb650
mov ecx, dword [esi + 0xc]
mov edx, edi
test al, al
jne 0x10164a9c
mov byte [ecx + 0x11], 1
jmp 0x10164a9c
mov dword [esi + 0xc8], 0xffffffff
mov dword [esi + 4], edx
call fcn.101cb650
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0xc]
test al, al
jne 0x10164ae1
mov byte [ecx + 0x11], 1
jmp 0x10164ae1
mov dword [esi + 0xc8], 2
push 0x60
push 8
call fcn.101cc329
add esp, 8
jmp 0x101650cc
lea eax, [esi + 0xb4]
mov dword [esi + 0x94], 0x1020d440
mov dword [esi + 0x98], 2
mov dword [esi + 0x30], 2
mov dword [esi + 0x38], 2
mov dword [esi + 0x40], 0x20
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 4
mov byte [esi + 0x4c], 3
mov dword [esi + 0x50], 2
mov dword [esi + 0x58], 2
mov dword [esi + 0x60], 0x20
mov dword [esi + 0x64], 1
mov dword [esi + 0x68], 4
mov byte [esi + 0x6c], 3
mov dword [esi + 0xc8], 1
mov dword [esi + 0x20], eax
lea eax, [esi + 0x18]
mov dword [esi + 0x24], 0x10162dd0
mov dword [esi + 0x28], eax
lea eax, [esi + 0x30]
mov dword [esi + 0x2c], 0x101658b0
mov dword [esi + 0xa4], eax
lea eax, [esi + 0x20]
mov dword [esi + 0xa8], 2
mov dword [esi + 0x9c], eax
mov dword [esi + 0xa0], 2
lea eax, [esi + 0x94]
push 0x1020d450
push eax
call fcn.101cc530
add esp, 8
ud2