Function at 0x470db0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x918
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x5a7184]
mov ebx, ecx
test ebx, ebx
push edi
mov dword [esp + 0x14], ebx
je 0x470de8
cmp dword [ebx + 0x138], edx
je 0x470df5
mov ebx, dword [ebx + 0x544]
test ebx, ebx
jne 0x470dd2
mov dword [esp + 0x14], ebx
test ecx, ecx
je 0x4716f8
jmp 0x4716f3
mov ecx, dword [ebx + 0x540]
mov dword [esp + 0x14], ebx
call fcn.004e2760
test eax, eax
je 0x4716e7
shr esi, 0x10
test esi, esi
jne 0x470eee
mov eax, dword [ebx + 0x138]
push eax
call dword [sym.imp.WSOCK32.dll_WSACancelAsyncRequest]
lea edi, [ebx + 0x140]
test edi, edi
je 0x470eee
mov ecx, 0x5a7188
call fcn.004c8280
lea esi, [ebx + 0x64]
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x470ee4
mov eax, dword [edi + 0xc]
test eax, eax
je 0x470eee
mov eax, dword [eax]
test eax, eax
je 0x470eee
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
test eax, eax
lea ebp, [ebx + 0xc8]
je 0x470e86
push eax
mov edx, 0x64
mov ecx, ebp
call fcn.0041ee40
jmp 0x470e8a
mov byte [ebp], 0
mov eax, dword [edi + 0xc]
cmp dword [eax], 0
je 0x47105d
xor esi, esi
mov edx, dword [eax + esi]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
test eax, eax
je 0x470ed1
push eax
mov edx, 0x104
lea ecx, [esp + 0x1c]
call fcn.0041ee40
mov ecx, dword [0x5a7188]
push 0
lea edx, [esp + 0x1c]
call fcn.004c7e10
test eax, eax
je 0x470ed1
mov dword [0x5a7188], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + esi + 4]
add esi, 4
test ecx, ecx
jne 0x470e98
jmp 0x47105d
mov eax, dword [edi]
test eax, eax
jne 0x471021
mov eax, dword [ebx + 0x130]
cmp eax, 4
lea ebp, [ebx + 0xc8]
mov byte [ebp], 0
je case.0x471076.4
cmp eax, 5
je case.0x471076.5
cmp eax, 0x33
je case.0x471076.51
cmp eax, 0x34
je case.0x471076.52
cmp eax, 6
je case.0x471076.6
cmp eax, 7
je case.0x471076.7
cmp eax, 8
je case.0x471076.8
cmp eax, 9
je case.0x471076.9
cmp eax, 0xa
je case.0x471076.10
mov ecx, dword [0x5ae60c]
test ecx, ecx
je 0x470fa3
test eax, eax
je 0x470f62
cmp eax, 1
jne 0x470fa3
xor eax, eax
mov ecx, 0x201
lea edi, [esp + 0x120]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x540]
lea eax, [esp + 0x120]
push eax
push 0
push 0
push 0x16
push 0x58698c
push 0
xor edx, edx
mov dword [esp + 0x14c], ebx
call fcn.0050e610
test eax, eax
je 0x4716e7
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x4716e7
mov eax, dword [ebx + 0x130]
test eax, eax
jne 0x470fdb
push ebx
xor edx, edx
mov ecx, 0x7d6
call fcn.0041d620
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x5a5504]
jmp 0x470ffc
lea edx, [ebx + 0x64]
push edx
xor edx, edx
mov ecx, 0x7d5
call fcn.0041d620
push eax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x5a5514]
mov dword [0x59bcec], 0
mov dword [0x5ae23c], 1
mov ecx, dword [ebx + 0x540]
mov ecx, dword [ecx]
add esp, 0xc
push eax
jmp 0x4716de
lea ebp, [ebx + 0xc8]
push eax
mov edx, 0x64
mov ecx, ebp
call fcn.0041ee40
push esi
mov edx, 0x104
lea ecx, [esp + 0x1c]
call fcn.0041ee40
mov ecx, dword [0x5a7188]
push 0
lea edx, [esp + 0x1c]
call fcn.004c7e10
test eax, eax
je 0x47105d
mov dword [0x5a7188], eax
mov edx, dword [ebx + 0x130]
lea eax, [edx - 2]
cmp eax, 0x32
ja case.0x471076.11
movzx eax, byte [eax + 0x47173c]
jmp dword [eax*4 + 0x47170c]
mov esi, dword [0x5a3a48]
test esi, esi
je 0x4716e7
jmp 0x471090
mov eax, dword [esi + 0x534]
test eax, eax
je 0x471101
lea ecx, [ebx + 0x64]
lea eax, [esi + 0x4b8]
push ecx
push eax
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x471101
lea edi, [esi + 0x454]
lea eax, [esi + 0x4b8]
push edi
push eax
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x471101
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
lea ecx, [esi + 0x3f0]
push ecx
lea edx, [esp + 0x20]
push str.Chat__s___s_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esi]
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov esi, dword [esi + 0x88c]
test esi, esi
jne 0x471090
jmp 0x4716e7
mov esi, dword [0x5a8ba4]
test esi, esi
je 0x4716e7
mov edi, edi
mov eax, dword [esi + 0x47c]
test eax, eax
je 0x47117b
mov eax, dword [esp + 0x14]
add eax, 0x64
push eax
lea ebx, [esi + 0xcc]
push ebx
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x471177
lea edi, [esi + 0x68]
push edi
push ebx
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x471177
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push 0
push 1
push 1
push 1
mov edx, 1
mov ecx, esi
call fcn.00536d90
mov ebx, dword [esp + 0x14]
mov esi, dword [esi + 0x4bc]
test esi, esi
jne 0x471120
jmp 0x4716e7
mov esi, dword [0x5b1224]
test esi, esi
je 0x4716e7
jmp 0x4711a0
cmp dword [esi + 0x150], 4
jne 0x471222
lea edx, [ebx + 0x64]
push edx
lea edi, [esi + 0x64]
push edi
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x471222
mov dword [esi + 0x150], eax
cmp byte [ebp], 0
je 0x4711e7
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
cmp byte [ebp], 0
je 0x4711e7
mov ecx, esi
call fcn.0051c680
test eax, eax
je 0x471222
mov eax, dword [0x5ae60c]
test eax, eax
mov edi, dword [esi + 0x148]
je 0x471206
push 4
push 0x3d
mov edx, esi
mov ecx, str.SOCKOPEN
call fcn.0051b2f0
mov edx, edi
mov ecx, esi
call fcn.0051b1b0
test eax, eax
je 0x47121a
mov ecx, esi
call fcn.0051b0e0
mov esi, dword [0x5b1224]
jmp 0x471228
mov esi, dword [esi + 0x198]
test esi, esi
jne 0x4711a0
jmp 0x4716e7
cmp byte [ebp], 0
je 0x47127f
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x471255
mov ecx, dword [ebx + 0x540]
add ecx, 0x840
jmp 0x471274
push eax
call dword [sym.imp.WSOCK32.dll_htonl]
mov ecx, dword [ebx + 0x540]
mov dword [ecx + 0x908], eax
mov ecx, dword [ebx + 0x540]
add ecx, 0x8a4
mov edx, 0x64
push ebp
call fcn.0041ee40
mov ecx, dword [ebx + 0x540]
mov eax, dword [ecx + 0x834]
test eax, eax
jne 0x4716e7
call fcn.0054ac40
jmp 0x4716e7
cmp byte [ebp], 0
je 0x4716e7
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov edx, dword [ebx + 0x540]
mov dword [edx + 0x908], eax
mov ecx, dword [ebx + 0x540]
mov eax, dword [ecx + 0x908]
cmp eax, 0xffffffff
jne 0x4712e7
mov dword [ecx + 0x908], 0
mov eax, dword [ebx + 0x540]
mov byte [eax + 0x8a4], 0
jmp 0x4716e7
push eax
call dword [sym.imp.WSOCK32.dll_htonl]
mov ecx, dword [ebx + 0x540]
mov dword [ecx + 0x908], eax
mov ecx, dword [ebx + 0x540]
push ebp
add ecx, 0x8a4
mov edx, 0x64
call fcn.0041ee40
mov eax, dword [ebx + 0x540]
mov ecx, dword [eax]
push 0x34
lea edx, [eax + 0x8a4]
push 0
push edx
mov edx, 0x583b74
call fcn.00470c10
jmp 0x4716e7
cmp byte [ebp], 0
je 0x47138a
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x47137d
mov ecx, dword [ebx + 0x540]
push ebp
add ecx, 0x840
mov edx, 0x64
call fcn.0041ee40
mov ecx, dword [ebx + 0x540]
add ecx, 0x840
call fcn.00524fb0
mov ecx, dword [ebx + 0x540]
call fcn.0054ac40
jmp 0x4716e7
mov eax, dword [ebx + 0x540]
mov byte [eax + 0x840], 0
mov ecx, dword [ebx + 0x540]
call fcn.0054ac40
jmp 0x4716e7
xor edx, edx
mov ecx, ebp
call fcn.00488770
jmp 0x4716e7
mov esi, dword [0x5a3a48]
test esi, esi
je 0x4716e7
mov eax, dword [ebx + 0x134]
lea esp, [esp]
cmp eax, dword [esi]
je 0x4713d3
mov esi, dword [esi + 0x88c]
test esi, esi
jne 0x4713c0
jmp 0x4716e7
cmp byte [ebp], 0
je 0x471404
lea edi, [esi + 0x4b8]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x471404
mov ecx, esi
call fcn.0042d240
jmp 0x4716e7
xor edx, edx
mov ecx, 0x7d7
call fcn.0041d620
mov edx, eax
mov ecx, esi
call fcn.0042cb60
jmp 0x4716e7
mov esi, dword [0x5afc18]
test esi, esi
je 0x4716e7
mov eax, dword [ebx + 0x134]
cmp eax, dword [esi]
je 0x471445
mov esi, dword [esi + 0x3cc]
test esi, esi
jne 0x471432
jmp 0x4716e7
cmp byte [ebp], 0
je 0x471476
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x471476
mov ecx, esi
call fcn.00516360
jmp 0x4716e7
xor edx, edx
mov ecx, 0x7d7
call fcn.0041d620
push eax
xor edx, edx
mov ecx, esi
call fcn.00515c80
jmp 0x4716e7
mov esi, dword [0x5afc18]
test esi, esi
je 0x471521
nop
mov eax, dword [esi + 0x340]
test eax, eax
je 0x4714cb
cmp word [esi + 0x354], 0
jne 0x4714cb
lea ecx, [ebx + 0x64]
push ecx
lea edx, [esi + 0xcc]
push edx
call fcn.005809c6
add esp, 8
test eax, eax
je 0x4714d7
mov esi, dword [esi + 0x3cc]
test esi, esi
jne 0x4714a0
jmp 0x471521
cmp byte [ebp], 0
je 0x47150b
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x47150b
push 5
push 0
mov edx, edi
mov ecx, esi
call fcn.00514eb0
jmp 0x471521
xor edx, edx
mov ecx, 0x7d8
call fcn.0041d620
push eax
xor edx, edx
mov ecx, esi
call fcn.00515c80
mov esi, dword [0x5a3a48]
test esi, esi
je 0x4716e7
nop
mov eax, dword [esi + 0x52c]
test eax, eax
je 0x47155b
cmp word [esi + 0x51c], 0
jne 0x47155b
lea eax, [ebx + 0x64]
push eax
lea ecx, [esi + 0x4b8]
push ecx
call fcn.005809c6
add esp, 8
test eax, eax
je 0x47156a
mov esi, dword [esi + 0x88c]
test esi, esi
jne 0x471530
jmp 0x4716e7
cmp byte [ebp], 0
je 0x4715a1
lea edi, [esi + 0x4b8]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4715a1
push 5
push 0
mov edx, edi
mov ecx, esi
call fcn.0042c640
jmp 0x4716e7
xor edx, edx
mov ecx, 0x7d8
call fcn.0041d620
mov edx, eax
mov ecx, esi
call fcn.0042cb60
jmp 0x4716e7
mov esi, dword [0x5a8ba4]
test esi, esi
je 0x4716e7
mov eax, dword [ebx + 0x134]
nop
cmp eax, dword [esi]
je 0x4715e3
mov esi, dword [esi + 0x4bc]
test esi, esi
jne 0x4715d0
jmp 0x4716e7
cmp byte [ebp], 0
je 0x471614
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.0041ee40
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x471614
mov ecx, esi
call fcn.00490880
jmp 0x4716e7
xor edx, edx
mov ecx, 0x7d7
call fcn.0041d620
push eax
xor edx, edx
mov ecx, esi
call fcn.00490190
jmp 0x4716e7
mov eax, dword [0x5ae60c]
test eax, eax
je 0x471686
mov ecx, ebx
call fcn.004706e0
test eax, eax
je 0x471686
test edx, edx
je 0x47164c
cmp edx, 1
jne 0x471686
xor eax, eax
lea edx, [esp + 0x120]
push edx
push eax
push eax
push 0x16
mov ecx, 0x201
lea edi, [esp + 0x130]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x540]
push 0x58698c
push eax
xor edx, edx
mov dword [esp + 0x14c], ebx
call fcn.0050e610
test eax, eax
je 0x4716e7
mov ecx, ebx
call fcn.004706e0
test eax, eax
je 0x4716e7
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x4716e7
push ebp
lea eax, [ebx + 0x64]
push eax
xor edx, edx
mov ecx, 0x7d4
call fcn.0041d620
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x5a5514]
mov dword [0x59bcec], 0
mov dword [0x5ae23c], 1
mov eax, dword [ebx + 0x540]
add esp, 0x10
push ecx
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
call fcn.00503ad0
mov ecx, 0x5a7188
call fcn.004c8280
mov ecx, ebx
call fcn.00470640
xor ecx, ecx
call fcn.004709a0
pop edi
xor eax, eax
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret