Function at 0x54afb0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x118
push esi
mov esi, dword [esp + 0x124]
test esi, esi
push edi
mov edi, edx
je 0x54afdb
mov ecx, esi
call fcn.004e2760
test eax, eax
jne 0x54afea
pop edi
pop esi
add esp, 0x118
ret 8
call fcn.004e27c0
mov esi, eax
test esi, esi
je 0x54b287
shr edi, 0x10
test edi, edi
je 0x54b042
mov eax, dword [esi + 0x41c]
test eax, eax
jne 0x54b287
mov eax, dword [esi + 0x420]
test eax, eax
je 0x54b013
mov dword [esi + 0x830], 3
lea edi, [esi + 0x444]
mov edx, edi
mov ecx, 0x1779
call fcn.0041d620
mov ecx, esi
call fcn.0054a7d0
mov edx, esi
mov ecx, edi
call fcn.0054a630
pop edi
xor eax, eax
pop esi
add esp, 0x118
ret 8
mov dword [esi + 0x18], 0
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea edi, [esi + 0x10c0]
push ebp
push edi
mov dword [esp + 0x20], eax
mov word [esp + 0x14], 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edi
call fcn.005705cb
add esp, 4
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov ebp, dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov word [esp + 0x12], ax
mov eax, dword [esp + 0x128]
cmp eax, 0xffffffff
je 0x54b09e
mov dword [esp + 0x14], eax
jmp 0x54b11a
mov ecx, dword [esi + 0x28]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x54b11a
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x54b11a
mov edi, 4
nop
mov ecx, dword [edi + eax]
mov eax, dword [ecx]
push eax
call ebp
test eax, eax
je 0x54b108
push eax
mov edx, 0x104
lea ecx, [esp + 0x24]
call fcn.0041ee40
lea edx, [esp + 0x20]
push edx
lea eax, [esi + 0x1124]
push eax
call fcn.005809c6
add esp, 8
test eax, eax
je 0x54b108
mov ecx, dword [esi + 0x10]
push 0
lea edx, [esp + 0x24]
call fcn.004c7e10
test eax, eax
je 0x54b108
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x28]
mov ecx, dword [edi + eax + 4]
add edi, 4
test ecx, ecx
jne 0x54b0c0
mov edi, dword [esp + 0xc]
mov eax, dword [0x5a8b64]
test eax, eax
je 0x54b196
mov ecx, dword [esi + 8]
call fcn.00488360
mov ecx, dword [esp + 0x14]
push ecx
mov byte [esp + 0x24], 0
call ebp
test eax, eax
je 0x54b14a
push eax
mov edx, 0x104
lea ecx, [esp + 0x24]
call fcn.0041ee40
mov al, byte [esp + 0x20]
test al, al
je 0x54b196
lea ecx, [esi + 0x1124]
call fcn.004881d0
test eax, eax
jne 0x54b196
lea ecx, [esp + 0x20]
call fcn.004881d0
test eax, eax
jne 0x54b196
mov edx, dword [esi + 8]
push esi
push edx
push eax
push edi
call fcn.005705cb
add esp, 4
mov edx, eax
lea ecx, [esp + 0x2c]
call fcn.0048a3e0
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x118
ret 8
mov eax, dword [esp + 0x14]
push 0
mov dword [esi + 0x23a4], eax
mov ecx, dword [esp + 0x18]
push 0
mov dword [esi + 0x83c], ecx
mov dx, word [0x59bcfc]
mov cx, word [0x59bcf8]
push 2
push 0
call fcn.005049f0
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x54b1e4
lea edi, [esi + 0x444]
mov edx, edi
mov ecx, 0x177a
call fcn.0041d620
jmp 0x54b276
push 4
lea edx, [esp + 0x10]
push edx
push 8
push 0xffff
push eax
mov dword [esp + 0x20], 1
call dword [sym.imp.WSOCK32.dll_setsockopt]
mov eax, dword [0x5b4314]
mov ecx, dword [esi + 4]
push 0x10
push 0x800d
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 4]
push 0x10
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x54b286
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
je 0x54b286
mov eax, dword [esi + 0x41c]
test eax, eax
jne 0x54b286
mov eax, dword [esi + 0x420]
test eax, eax
je 0x54b25b
mov dword [esi + 0x830], 4
lea edi, [esi + 0x444]
mov edx, 0x3e7
mov ecx, edi
call fcn.0041ef30
mov edx, esi
mov ecx, ebp
call fcn.0054aad0
mov ecx, esi
call fcn.0054a7d0
mov ecx, edi
mov edx, esi
call fcn.0054a630
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x118
ret 8