Function at 0x4cb490
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x541514]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004cba80
add esp, 4
push 0x20
push 0
lea eax, [ebp - 0x58]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
mov dword [ebp - 0x58], 4
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp + 0x10]
push ecx
push 0x530f94
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004a2400
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4cb54c
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.004a23c0
add esp, 4
xor eax, eax
jmp 0x4cb890
cmp dword [ebp + 0x14], 0
je 0x4cb55c
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 1
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
jmp 0x4cb56d
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0
je 0x4cb82b
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WSOCK32.dll_socket]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jge 0x4cb5b6
call fcn.004cb9e0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
push edx
call fcn.004cbc90
add esp, 4
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WSOCK32.dll_connect]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x4cb601
cmp dword [ebp + 0x14], 0
jne 0x4cb601
call fcn.004cb9e0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4cb564
cmp dword [ebp - 0x34], 0
jge 0x4cb824
cmp dword [ebp + 0x14], 0
je 0x4cb824
call fcn.004cb9e0
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5c]
mov dword [edx + 8], eax
cmp dword [ebp - 0x5c], 0x2734
je 0x4cb643
cmp dword [ebp - 0x5c], 0x2733
jne 0x4cb815
mov dword [ebp - 0x170], 0
mov dword [ebp - 0x188], 0
jmp 0x4cb668
mov ecx, dword [ebp - 0x188]
add ecx, 1
mov dword [ebp - 0x188], ecx
mov edx, dword [ebp - 0x188]
cmp edx, dword [ebp - 0x170]
jae 0x4cb68f
mov eax, dword [ebp - 0x188]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + eax*4 - 0x16c]
cmp edx, dword [ecx + 4]
jne 0x4cb68d
jmp 0x4cb68f
jmp 0x4cb659
mov eax, dword [ebp - 0x188]
cmp eax, dword [ebp - 0x170]
jne 0x4cb6c8
cmp dword [ebp - 0x170], 0x40
jae 0x4cb6c8
mov ecx, dword [ebp - 0x188]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x16c], eax
mov ecx, dword [ebp - 0x170]
add ecx, 1
mov dword [ebp - 0x170], ecx
xor edx, edx
jne 0x4cb64d
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x180], eax
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x17c], edx
push 0
call fcn.004cb8a0
add esp, 4
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x174], 0
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x184], eax
mov edx, 1
test edx, edx
je 0x4cb7c8
lea eax, [ebp - 0x180]
push eax
push 0
lea ecx, [ebp - 0x170]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, 1
push eax
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0
jge 0x4cb7c1
call fcn.004cb9e0
cmp eax, 0x2714
jne 0x4cb7b2
push 0
call fcn.004cb8a0
add esp, 4
sub eax, dword [ebp - 0x64]
mov dword [ebp - 0x174], eax
mov ecx, dword [ebp - 0x174]
cmp ecx, dword [ebp - 0x184]
jg 0x4cb7a4
mov edx, dword [ebp - 0x184]
sub edx, dword [ebp - 0x174]
mov dword [ebp - 0x180], edx
mov dword [ebp - 0x17c], 0
jmp 0x4cb716
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0x274c
jmp 0x4cb7c8
call fcn.004cb9e0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4cb7c8
jmp 0x4cb7c8
cmp dword [ebp - 0x178], 0
jl 0x4cb815
cmp dword [ebp - 0x178], 0
jne 0x4cb7e6
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x274c
jmp 0x4cb815
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4cb815
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x34], 0
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
cmp dword [ebp - 0x60], 0
jne 0x4cb822
jmp 0x4cb564
jmp 0x4cb82b
jmp 0x4cb82b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x30]
mov dword [ecx + 0xc], edx
cmp dword [ebp - 0x34], 0
jge 0x4cb847
mov eax, dword [ebp - 0x38]
push eax
call fcn.004a3280
xor eax, eax
jmp 0x4cb890
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x18]
push ecx
call fcn.004f4950
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x4cb882
call fcn.004cb9e0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x38]
push edx
call fcn.004a3280
xor eax, eax
jmp 0x4cb890
mov eax, dword [ebp - 0x38]
push eax
call fcn.004a3280
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0047294a
mov esp, ebp
pop ebp
ret