Function at 0x475de0
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 [0x5cb9dc]
mov ebx, ecx
test ebx, ebx
push edi
mov dword [esp + 0x14], ebx
je 0x475e18
cmp dword [ebx + 0x138], edx
je 0x475e25
mov ebx, dword [ebx + 0x544]
test ebx, ebx
jne 0x475e02
mov dword [esp + 0x14], ebx
test ecx, ecx
je 0x476727
jmp 0x476722
mov ecx, dword [ebx + 0x540]
mov dword [esp + 0x14], ebx
call fcn.004f0af0
test eax, eax
je 0x476716
shr esi, 0x10
test esi, esi
jne 0x475f1e
mov eax, dword [ebx + 0x138]
push eax
call dword [sym.imp.WSOCK32.dll_WSACancelAsyncRequest]
lea edi, [ebx + 0x140]
test edi, edi
je 0x475f1e
mov ecx, 0x5cb9e0
call fcn.004d3d60
lea esi, [ebx + 0x64]
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x475f14
mov eax, dword [edi + 0xc]
test eax, eax
je 0x475f1e
mov eax, dword [eax]
test eax, eax
je 0x475f1e
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
test eax, eax
lea ebp, [ebx + 0xc8]
je 0x475eb6
push eax
mov edx, 0x64
mov ecx, ebp
call fcn.00420d70
jmp 0x475eba
mov byte [ebp], 0
mov eax, dword [edi + 0xc]
cmp dword [eax], 0
je 0x476076
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 0x475f01
push eax
mov edx, 0x104
lea ecx, [esp + 0x1c]
call fcn.00420d70
mov ecx, dword [0x5cb9e0]
push 0
lea edx, [esp + 0x1c]
call fcn.004d38f0
test eax, eax
je 0x475f01
mov dword [0x5cb9e0], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + esi + 4]
add esi, 4
test ecx, ecx
jne 0x475ec8
jmp 0x476076
mov eax, dword [edi]
test eax, eax
jne 0x47603a
mov eax, dword [ebx + 0x130]
cmp eax, 4
lea ebp, [ebx + 0xc8]
mov byte [ebp], 0
je case.0x47608f.4
cmp eax, 5
je case.0x47608f.5
cmp eax, 0x33
je case.0x47608f.51
cmp eax, 0x34
je case.0x47608f.52
cmp eax, 6
je case.0x47608f.6
cmp eax, 7
je case.0x47608f.7
cmp eax, 8
je case.0x47608f.8
cmp eax, 9
je case.0x47608f.9
cmp eax, 0xa
je case.0x47608f.10
mov ecx, dword [0x5f35d0]
test ecx, ecx
je 0x475fd3
test eax, eax
je 0x475f92
cmp eax, 1
jne 0x475fd3
xor eax, eax
mov ecx, 0x202
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 0x5a7f00
push 0
xor edx, edx
mov dword [esp + 0x14c], ebx
call fcn.0051fbb0
test eax, eax
je 0x476716
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x476716
mov eax, dword [ebx + 0x130]
test eax, eax
jne 0x476011
push ebx
xor edx, edx
mov ecx, 0x7d6
call fcn.0041f1a0
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x5c9d44]
add esp, 0xc
jmp 0x4766f0
lea edx, [ebx + 0x64]
push edx
xor edx, edx
mov ecx, 0x7d5
call fcn.0041f1a0
push eax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x5c9d54]
add esp, 0xc
jmp 0x4766f0
lea ebp, [ebx + 0xc8]
push eax
mov edx, 0x64
mov ecx, ebp
call fcn.00420d70
push esi
mov edx, 0x104
lea ecx, [esp + 0x1c]
call fcn.00420d70
mov ecx, dword [0x5cb9e0]
push 0
lea edx, [esp + 0x1c]
call fcn.004d38f0
test eax, eax
je 0x476076
mov dword [0x5cb9e0], eax
mov edx, dword [ebx + 0x130]
lea eax, [edx - 2]
cmp eax, 0x32
ja case.0x47608f.11
movzx eax, byte [eax + 0x476768]
jmp dword [eax*4 + 0x476738]
mov esi, dword [0x5c81a0]
test esi, esi
je 0x476716
mov eax, dword [esi + 0x534]
test eax, eax
je 0x476115
lea ecx, [ebx + 0x64]
lea eax, [esi + 0x4b8]
push ecx
push eax
call fcn.005a299c
add esp, 8
test eax, eax
jne 0x476115
lea edi, [esi + 0x454]
lea eax, [esi + 0x4b8]
push edi
push eax
call fcn.005a299c
add esp, 8
test eax, eax
jne 0x476115
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
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 + 0x890]
test esi, esi
jne 0x4760a4
jmp 0x476716
mov esi, dword [0x5ed44c]
test esi, esi
je 0x476716
mov eax, dword [esi + 0x47c]
test eax, eax
je 0x47618d
mov eax, dword [esp + 0x14]
add eax, 0x64
push eax
lea ebx, [esi + 0xcc]
push ebx
call fcn.005a299c
add esp, 8
test eax, eax
jne 0x476189
lea edi, [esi + 0x68]
push edi
push ebx
call fcn.005a299c
add esp, 8
test eax, eax
jne 0x476189
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push 0
push 1
push 1
push 1
mov edx, 1
mov ecx, esi
call fcn.0054c570
mov ebx, dword [esp + 0x14]
mov esi, dword [esi + 0x4bc]
test esi, esi
jne 0x476132
jmp 0x476716
mov esi, dword [0x5f659c]
test esi, esi
je 0x476716
lea ebx, [ebx]
cmp dword [esi + 0x1b4], 4
jne 0x476239
lea edx, [ebx + 0x64]
push edx
lea edi, [esi + 0xc8]
push edi
call fcn.005a299c
add esp, 8
test eax, eax
jne 0x476239
mov dword [esi + 0x1b4], eax
cmp byte [ebp], 0
je 0x4761fe
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
cmp byte [ebp], 0
je 0x4761fe
mov ecx, esi
call fcn.0052e2e0
test eax, eax
je 0x476239
mov eax, dword [0x5f35d0]
test eax, eax
mov edi, dword [esi + 0x1ac]
je 0x47621d
push 4
push 0x3d
mov edx, esi
mov ecx, str.SOCKOPEN
call fcn.0052cef0
mov edx, edi
mov ecx, esi
call fcn.0052cdb0
test eax, eax
je 0x476231
mov ecx, esi
call fcn.0052ccd0
mov esi, dword [0x5f659c]
jmp 0x47623f
mov esi, dword [esi + 0x208]
test esi, esi
jne 0x4761b0
jmp 0x476716
cmp byte [ebp], 0
je 0x476296
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x47626c
mov ecx, dword [ebx + 0x540]
add ecx, 0x840
jmp 0x47628b
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.00420d70
mov ecx, dword [ebx + 0x540]
mov eax, dword [ecx + 0x834]
test eax, eax
jne 0x476716
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x4762b9
call fcn.00569510
mov ecx, dword [ebx + 0x540]
call fcn.004c1000
jmp 0x476716
cmp byte [ebp], 0
je 0x476716
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 0x476313
mov dword [ecx + 0x908], 0
mov eax, dword [ebx + 0x540]
mov byte [eax + 0x8a4], 0
jmp 0x476716
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.00420d70
mov eax, dword [ebx + 0x540]
mov edx, dword [ebx + 0x12c]
push 0x34
push edx
lea ecx, [eax + 0x8a4]
push ecx
mov ecx, dword [eax]
mov edx, 0x5a4bec
call fcn.00475c40
jmp 0x476716
cmp byte [ebp], 0
je 0x4763ad
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x4763a0
mov ecx, dword [ebx + 0x540]
push ebp
add ecx, 0x840
mov edx, 0x64
call fcn.00420d70
mov ecx, dword [ebx + 0x540]
add ecx, 0x840
call fcn.00537a90
jmp 0x4763ad
mov edx, dword [ebx + 0x540]
mov byte [edx + 0x840], 0
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x4762b9
mov ecx, dword [ebx + 0x540]
jmp 0x4762b4
xor edx, edx
mov ecx, ebp
call fcn.00488ec0
jmp 0x476716
mov esi, dword [0x5c81a0]
test esi, esi
je 0x476716
mov eax, dword [ebx + 0x134]
cmp eax, dword [esi]
je 0x4763fb
mov esi, dword [esi + 0x890]
test esi, esi
jne 0x4763e8
jmp 0x476716
cmp byte [ebp], 0
je 0x47642c
lea edi, [esi + 0x4b8]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x47642c
mov ecx, esi
call fcn.0042f820
jmp 0x476716
xor edx, edx
mov ecx, 0x7d7
call fcn.0041f1a0
mov edx, eax
mov ecx, esi
call fcn.0042f110
jmp 0x476716
mov esi, dword [0x5f4f78]
test esi, esi
je 0x476716
mov eax, dword [ebx + 0x134]
lea ebx, [ebx]
cmp eax, dword [esi]
je 0x476473
mov esi, dword [esi + 0x3d4]
test esi, esi
jne 0x476460
jmp 0x476716
cmp byte [ebp], 0
je 0x4764a4
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4764a4
mov ecx, esi
call fcn.00527ac0
jmp 0x476716
xor edx, edx
mov ecx, 0x7d7
call fcn.0041f1a0
push eax
xor edx, edx
mov ecx, esi
call fcn.005273e0
jmp 0x476716
mov esi, dword [0x5f4f78]
test esi, esi
je 0x476551
lea ecx, [ecx]
mov eax, dword [esi + 0x340]
test eax, eax
je 0x4764fb
cmp word [esi + 0x354], 0
jne 0x4764fb
lea eax, [ebx + 0x64]
push eax
lea ecx, [esi + 0xcc]
push ecx
call fcn.005a299c
add esp, 8
test eax, eax
je 0x476507
mov esi, dword [esi + 0x3d4]
test esi, esi
jne 0x4764d0
jmp 0x476551
cmp byte [ebp], 0
je 0x47653b
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x47653b
push 5
push 0
mov edx, edi
mov ecx, esi
call fcn.005265f0
jmp 0x476551
xor edx, edx
mov ecx, 0x7d8
call fcn.0041f1a0
push eax
xor edx, edx
mov ecx, esi
call fcn.005273e0
mov esi, dword [0x5c81a0]
test esi, esi
je 0x476716
nop
mov eax, dword [esi + 0x52c]
test eax, eax
je 0x47658b
cmp word [esi + 0x51c], 0
jne 0x47658b
lea edx, [ebx + 0x64]
push edx
lea eax, [esi + 0x4b8]
push eax
call fcn.005a299c
add esp, 8
test eax, eax
je 0x47659a
mov esi, dword [esi + 0x890]
test esi, esi
jne 0x476560
jmp 0x476716
cmp byte [ebp], 0
je 0x4765d1
lea edi, [esi + 0x4b8]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4765d1
push 5
push 0
mov edx, edi
mov ecx, esi
call fcn.0042ebf0
jmp 0x476716
xor edx, edx
mov ecx, 0x7d8
call fcn.0041f1a0
mov edx, eax
mov ecx, esi
call fcn.0042f110
jmp 0x476716
mov esi, dword [0x5ed44c]
test esi, esi
je 0x476716
mov eax, dword [ebx + 0x134]
nop
cmp eax, dword [esi]
je 0x476613
mov esi, dword [esi + 0x4bc]
test esi, esi
jne 0x476600
jmp 0x476716
cmp byte [ebp], 0
je 0x476644
lea edi, [esi + 0xcc]
push ebp
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x476644
mov ecx, esi
call fcn.00492df0
jmp 0x476716
xor edx, edx
mov ecx, 0x7d7
call fcn.0041f1a0
push eax
xor edx, edx
mov ecx, esi
call fcn.00492700
jmp 0x476716
mov eax, dword [0x5f35d0]
test eax, eax
je 0x4766b6
mov ecx, ebx
call fcn.004756d0
test eax, eax
je 0x4766b6
test edx, edx
je 0x47667c
cmp edx, 1
jne 0x4766b6
xor eax, eax
mov ecx, 0x202
lea edi, [esp + 0x120]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x120]
push ecx
mov ecx, dword [ebx + 0x540]
push eax
push eax
push 0x16
push 0x5a7f00
push eax
xor edx, edx
mov dword [esp + 0x14c], ebx
call fcn.0051fbb0
test eax, eax
je 0x476716
mov ecx, ebx
call fcn.004756d0
test eax, eax
je 0x476716
mov eax, dword [ebx + 0x12c]
test eax, eax
je 0x476716
push ebp
lea eax, [ebx + 0x64]
push eax
xor edx, edx
mov ecx, 0x7d4
call fcn.0041f1a0
push eax
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x5c9d54]
add esp, 0x10
mov dword [0x5f31fc], 1
mov dword [0x5bfd5c], 0
mov ecx, dword [ebx + 0x540]
mov ecx, dword [ecx]
lea edx, [esp + 0x18]
push eax
call fcn.00514ad0
mov ecx, 0x5cb9e0
call fcn.004d3d60
mov ecx, ebx
call fcn.00475630
xor ecx, ecx
call fcn.00475990
pop edi
xor eax, eax
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret