Function at 0x10014520
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1025b082
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebx
push ebp
push esi
mov esi, dword [esp + 0x12c]
push edi
mov edi, ecx
push esi
xor ebx, ebx
call fcn.10014120
test eax, eax
je 0x10014bb1
mov dword [esp + 0x10], 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x128], ebx
call fcn.1006acb0
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x48]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x54], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x10014b84
mov eax, dword [0x102f6fa8]
mov edx, dword [esp + 0x10]
push 0x10
push 0x2b66
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
je 0x10014bce
xor eax, eax
mov ecx, dword [0x1030ceb0]
mov ebp, dword [esi + 0x1c]
mov bx, word [esi + 0x22]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x30], eax
mov ax, word [esi + 0x24]
test ecx, ecx
mov word [esp + 0x30], ax
mov word [esp + 0x32], 1
je 0x10014619
and eax, 0xffff
push eax
push str.CRemapThread::ConnectSvr__ServerType:_d_
push str.RemapThread
push 1
push 0x1030c61c
call fcn.100a65e0
add esp, 0x14
cmp word [esi + 0x24], 5
jne 0x1001491d
mov ecx, edi
call fcn.100143e0
lea ecx, [esp + 0x7c]
mov word [esp + 0x32], ax
call fcn.10035a00
xor ecx, ecx
mov byte [esp + 0x128], 1
mov cx, word [esi + 0x26]
push ecx
lea ecx, [esp + 0x80]
call fcn.10035b10
xor eax, eax
lea edx, [esp + 0x18]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x84]
call fcn.10036270
test eax, eax
je 0x100148d9
xor esi, esi
mov ecx, dword [esp + 0x14]
cmp ecx, esi
je 0x100148bb
mov eax, dword [esp + 0x18]
cmp ax, si
je 0x100148bb
mov dword [esp + 0x28], ebp
mov ebp, ecx
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov dword [esp + 0x38], ecx
and ebx, 0xffff
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x40], ecx
mov ebx, eax
and eax, 0xffff
mov dword [esp + 0x44], ecx
push 1
push 0x102f6ff0
lea ecx, [esp + 0x74]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], esi
call fcn.1009ee90
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x78]
push edx
push eax
mov ecx, 0x102f6fd8
mov byte [esp + 0x130], 2
call fcn.10015f60
cmp eax, esi
jne 0x10014702
mov dword [esp + 0x1c], esi
jmp 0x10014718
lea esi, [eax + 0xc]
mov ecx, 5
lea edi, [esp + 0x34]
mov dword [esp + 0x1c], 1
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, 0x102f6fd8
call fcn.10015e10
mov ecx, 5
lea esi, [esp + 0x20]
mov edi, eax
mov byte [esp + 0x128], 1
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x6c]
call fcn.1009eef0
push 1
push 0x102f7010
lea ecx, [esp + 0x54]
call fcn.1009ee90
mov edx, dword [esp + 0x10]
mov ecx, 0x102f7030
push edx
mov byte [esp + 0x12c], 3
call fcn.10015c90
mov ecx, dword [esp + 0x134]
mov dword [eax], ecx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.1006ad00
cmp eax, 0xffffffff
jne 0x100148f6
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x100148f6
mov eax, dword [0x1030ceb0]
test eax, eax
je 0x100147ce
mov esi, dword [esp + 0x10]
call edi
push eax
push esi
push str.CRemapThread::ConnectSvr:_connect_called_failed__SOKCET__d___errno__d_
push str.RemapThread
push 1
push 0x1030c61c
call fcn.100a65e0
add esp, 0x18
mov ecx, dword [0x102f7030]
test ecx, ecx
je 0x1001482a
mov esi, dword [esp + 0x10]
xor edx, edx
mov eax, esi
shr eax, 4
div dword [0x102f7034]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x1001482e
cmp dword [eax + 8], esi
je 0x10014802
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x100147f3
jmp 0x1001482e
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [0x102f703c]
mov dword [eax], ecx
mov dword [0x102f703c], eax
mov eax, dword [0x102f7038]
dec eax
mov dword [0x102f7038], eax
jne 0x1001482a
mov ecx, 0x102f7030
call fcn.10015d70
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10014850
push esi
mov ecx, 0x102f6fd8
call fcn.10015e10
mov ecx, 5
lea esi, [esp + 0x34]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
jmp 0x100148a8
mov ecx, dword [0x102f6fd8]
test ecx, ecx
je 0x100148a8
mov eax, esi
xor edx, edx
shr eax, 4
div dword [0x102f6fdc]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x100148a8
cmp dword [eax + 8], esi
je 0x10014880
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x10014871
jmp 0x100148a8
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [0x102f6fe4]
mov dword [eax], ecx
mov dword [0x102f6fe4], eax
mov eax, dword [0x102f6fe0]
dec eax
mov dword [0x102f6fe0], eax
jne 0x100148a8
mov ecx, 0x102f6fd8
call fcn.10015f00
lea ecx, [esp + 0x4c]
mov byte [esp + 0x128], 1
call fcn.1009eef0
xor esi, esi
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x84]
call fcn.10036270
test eax, eax
jne 0x1001467e
call fcn.10036d40
lea ecx, [esp + 0x7c]
mov byte [esp + 0x128], 0
call fcn.10035aa0
xor eax, eax
jmp 0x10014bb3
lea ecx, [esp + 0x4c]
mov byte [esp + 0x128], 1
call fcn.1009eef0
lea ecx, [esp + 0x7c]
mov byte [esp + 0x128], 0
call fcn.10035aa0
jmp 0x10014b4e
xor ecx, ecx
lea edx, [esp + 0x34]
mov dword [esp + 0x38], ecx
push edx
mov dword [esp + 0x40], ecx
xor esi, esi
mov dword [esp + 0x44], ecx
push ebx
push ebp
mov ecx, 0x102f7048
mov dword [esp + 0x40], esi
call fcn.100177a0
test eax, eax
je 0x10014987
mov eax, dword [esp + 0x34]
cmp eax, 0xffffffff
je 0x10014987
mov ecx, ebx
mov dword [esp + 0x28], ebp
and ecx, 0xffff
mov ebp, eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x3c]
cmp ecx, 0xffffffff
mov esi, 1
mov dword [esp + 0x1c], ebp
je 0x10014979
mov ebx, ecx
mov dword [esp + 0x18], ebx
and ebx, 0xffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x5c], edx
cmp esi, ebx
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edx
je 0x10014a8f
push 1
push 0x102f6ff0
lea ecx, [esp + 0x74]
call fcn.1009ee90
mov ebp, dword [esp + 0x10]
xor edx, edx
mov eax, ebp
mov byte [esp + 0x128], 4
shr eax, 4
div dword [0x102f6fdc]
mov eax, dword [0x102f6fd8]
test eax, eax
je 0x100149f3
mov eax, dword [eax + edx*4]
test eax, eax
je 0x100149f3
cmp dword [eax + 8], ebp
je 0x100149ef
mov eax, dword [eax]
test eax, eax
jne 0x100149e0
xor ebx, ebx
jmp 0x10014a0a
test eax, eax
jne 0x100149f7
xor ebx, ebx
jmp 0x10014a0a
lea esi, [eax + 0xc]
mov ecx, 5
lea edi, [esp + 0x58]
mov ebx, 1
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x14]
mov ecx, 0x102f6fd8
push eax
push ebp
mov esi, ebp
call fcn.10015f60
test eax, eax
jne 0x10014a6c
mov eax, dword [0x102f6fd8]
test eax, eax
jne 0x10014a3c
mov ecx, dword [0x102f6fdc]
push 1
push ecx
mov ecx, 0x102f6fd8
call fcn.100160d0
mov ecx, 0x102f6fd8
call fcn.10016140
mov edx, dword [esp + 0x14]
mov dword [eax + 8], esi
mov dword [eax + 4], edx
mov ecx, dword [0x102f6fd8]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4]
mov dword [eax], ecx
mov edx, dword [0x102f6fd8]
mov ecx, dword [esp + 0x14]
mov dword [edx + ecx*4], eax
lea edi, [eax + 0xc]
mov ecx, 5
lea esi, [esp + 0x20]
mov byte [esp + 0x128], 0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x6c]
call fcn.1009eef0
mov ebp, dword [esp + 0x1c]
push 1
push 0x102f7010
lea ecx, [esp + 0x54]
call fcn.1009ee90
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
mov ecx, 0x102f7030
mov byte [esp + 0x130], 5
mov esi, eax
call fcn.10015dd0
test eax, eax
jne 0x10014b0c
mov eax, dword [0x102f7030]
test eax, eax
jne 0x10014adc
mov eax, dword [0x102f7034]
push 1
push eax
mov ecx, 0x102f7030
call fcn.10016000
mov ecx, 0x102f7030
call fcn.10016070
mov ecx, dword [esp + 0x14]
mov dword [eax + 8], esi
mov dword [eax + 4], ecx
mov edx, dword [0x102f7030]
mov ecx, dword [esp + 0x14]
mov edx, dword [edx + ecx*4]
mov dword [eax], edx
mov ecx, dword [0x102f7030]
mov edx, dword [esp + 0x14]
mov dword [ecx + edx*4], eax
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x18]
mov dword [eax + 0xc], ecx
push edx
push ebp
lea ecx, [esp + 0x18]
call fcn.1006ad00
cmp eax, 0xffffffff
jne 0x10014b3d
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
jne 0x10014be9
lea ecx, [esp + 0x4c]
mov byte [esp + 0x128], 0
call fcn.1009eef0
mov eax, dword [0x1030ceb0]
test eax, eax
je 0x10014b7d
mov eax, dword [esp + 0x134]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push str.CRemapThread::ConnectSvr:_Add_socket_to_g_mapSocketPair__SOCKET1__d___SOCKET2__d__n
push str.RemapThread
push 1
push 0x1030c61c
call fcn.100a65e0
add esp, 0x18
mov eax, 1
jmp 0x10014bb3
cmp dword [0x1030ceb0], ebx
je 0x10014bb1
mov esi, dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.CRemapThread::ConnectSvr:_ioctlsocket_called_failed__SOKCET__d___errno__d__n
push str.RemapThread
push 1
push 0x1030c61c
call fcn.100a65e0
add esp, 0x18
mov eax, ebx
mov ecx, dword [esp + 0x120]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x11c
ret 8
cmp dword [0x1030ceb0], ebx
je 0x10014bb1
mov esi, dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.CRemapThread::ConnectSvr:_WSAAsyncSelect_called_failed__SOKCET__d___errno__d_
jmp 0x10014b9d
mov eax, dword [0x1030ceb0]
xor ebp, ebp
cmp eax, ebp
je 0x10014c15
mov esi, dword [esp + 0x10]
call edi
push eax
push esi
push str.CRemapThread::ConnectSvr:_connect_called_failed__SOKCET__d___errno__d_
push str.RemapThread
push 1
push 0x1030c61c
call fcn.100a65e0
add esp, 0x18
mov esi, dword [0x102f7030]
cmp esi, ebp
je 0x10014c71
mov ecx, dword [esp + 0x10]
xor edx, edx
mov eax, ecx
shr eax, 4
div dword [0x102f7034]
mov eax, dword [esi + edx*4]
cmp eax, ebp
lea edx, [esi + edx*4]
je 0x10014c75
cmp dword [eax + 8], ecx
je 0x10014c49
mov edx, eax
mov eax, dword [eax]
cmp eax, ebp
jne 0x10014c3a
jmp 0x10014c75
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [0x102f703c]
mov dword [eax], edx
mov dword [0x102f703c], eax
mov eax, dword [0x102f7038]
dec eax
mov dword [0x102f7038], eax
jne 0x10014c71
mov ecx, 0x102f7030
call fcn.10015d70
mov ecx, dword [esp + 0x10]
cmp ebx, ebp
je 0x10014ced
lea eax, [esp + 0x14]
mov esi, ecx
push eax
push ecx
mov ecx, 0x102f6fd8
call fcn.10015f60
cmp eax, ebp
jne 0x10014cda
cmp dword [0x102f6fd8], ebp
jne 0x10014caa
mov ecx, dword [0x102f6fdc]
push 1
push ecx
mov ecx, 0x102f6fd8
call fcn.100160d0
mov ecx, 0x102f6fd8
call fcn.10016140
mov edx, dword [esp + 0x14]
mov dword [eax + 8], esi
mov dword [eax + 4], edx
mov ecx, dword [0x102f6fd8]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4]
mov dword [eax], ecx
mov edx, dword [0x102f6fd8]
mov ecx, dword [esp + 0x14]
mov dword [edx + ecx*4], eax
lea edi, [eax + 0xc]
mov ecx, 5
lea esi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
jmp 0x10014d98
mov esi, dword [0x102f6fd8]
cmp esi, ebp
je 0x10014d98
mov eax, ecx
xor edx, edx
shr eax, 4
div dword [0x102f6fdc]
mov eax, dword [esi + edx*4]
cmp eax, ebp
lea edx, [esi + edx*4]
je 0x10014d98
cmp dword [eax + 8], ecx
je 0x10014d25
mov edx, eax
mov eax, dword [eax]
cmp eax, ebp
jne 0x10014d16
jmp 0x10014d98
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [0x102f6fe4]
mov dword [eax], edx
mov dword [0x102f6fe4], eax
mov eax, dword [0x102f6fe0]
dec eax
mov dword [0x102f6fe0], eax
jne 0x10014d98
mov esi, dword [0x102f6fd8]
cmp esi, ebp
je 0x10014d6c
mov eax, dword [0x102f6fdc]
cmp eax, ebp
jbe 0x10014d6c
mov ecx, esi
mov edx, eax
mov eax, dword [ecx]
cmp eax, ebp
je 0x10014d66
mov eax, dword [eax]
cmp eax, ebp
jne 0x10014d60
add ecx, 4
dec edx
jne 0x10014d5a
push esi
call fcn.1024cbfa
mov ecx, dword [0x102f6fe8]
add esp, 4
mov dword [0x102f6fd8], ebp
mov dword [0x102f6fe0], ebp
mov dword [0x102f6fe4], ebp
call fcn.1009e010
mov dword [0x102f6fe8], ebp
lea ecx, [esp + 0x4c]
mov byte [esp + 0x128], 0
call fcn.1009eef0
xor eax, eax
jmp 0x10014bb3