Function at 0x4c84f0
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x28]
movzx ebx, word [ebp + 2]
push esi
push edi
xor edi, edi
mov dword [0x416fac], edi
movzx eax, byte [ebp + 0x11]
movzx ecx, byte [ebp + 0x10]
imul eax, eax, 0x3e8
mov edx, dword [ebp + 0x14]
push edx
add eax, ecx
and ebx, 1
push ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], eax
call fcn.004c4b10
mov esi, eax
test esi, esi
je 0x4c857b
push ebx
push 0x81
push esi
call fcn.004c49e0
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4c886c
push eax
call fcn.004c3d90
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
je 0x4c886c
push ebx
push esi
mov esi, eax
push esi
call fcn.004c4a60
mov dword [esp + 0x14], esi
jmp 0x4c8587
mov dword [esp + 0x14], 0x4186a1
mov esi, dword [esp + 0x14]
movzx eax, word [ebp + 0x12]
mov dword [esp + 0x10], eax
cmp eax, 0xfffe
jne 0x4c85cd
cmp byte [esi], 0
jne 0x4c85aa
mov dword [0x416fac], 4
jmp 0x4c886c
push esi
push 8
call fcn.004c4210
test eax, eax
jne 0x4c85c5
mov dword [0x416fac], 0x29
jmp 0x4c886c
dec eax
movzx eax, ax
mov dword [esp + 0x10], eax
call fcn.004c8210
cmp dword [0x53f8c4], edi
jne 0x4c85e9
mov dword [0x416fac], 0x60
jmp 0x4c886c
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x34]
push ecx
push esi
push edx
push ebp
call fcn.004c7410
mov edi, eax
test edi, edi
je 0x4c886c
call fcn.004c7200
mov byte [esp + 0x30], al
mov eax, dword [ebp + 0x18]
push eax
push ebp
call fcn.004c4b10
mov esi, eax
test esi, esi
je 0x4c86d0
cmp byte [esi], 0
je 0x4c86d0
push ebx
push 0x200
push esi
call fcn.004c49e0
test eax, eax
je 0x4c886c
push eax
call fcn.004c3d90
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4c886c
mov ecx, dword [0x416fd0]
push ecx
push esi
push ebp
call fcn.004c4a60
push ebp
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4c8681
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x54], eax
mov eax, dword [esp + 0x20]
push eax
push ebx
push 0
push ecx
push 0
jmp 0x4c8862
push ebp
call sub.WSOCK32.dll_gethostbyname
push ebp
mov esi, eax
call fcn.004cb4e1
add esp, 4
test esi, esi
jne 0x4c86a5
mov dword [0x416fac], 0x69
jmp 0x4c886c
movsx edx, word [esi + 0xa]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [edi + 0x54]
push edx
call fcn.004cb570
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push eax
push ebx
push 0
push ecx
push 0
jmp 0x4c8862
cmp byte [esp + 0x30], 0
je 0x4c878a
mov esi, dword [0x5406b8]
test esi, esi
je 0x4c886c
lea esp, [esp]
cmp dword [esi + 8], 0
je 0x4c877b
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c8707
mov dword [edi + 0x54], eax
jmp 0x4c872b
lea edx, [esi + 0xc]
push edx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4c877b
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
push ecx
push eax
lea ecx, [edi + 0x54]
push ecx
call fcn.004cb570
add esp, 0xc
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
push edx
push ebx
push 0
push eax
push 0
push edi
mov dword [0x416fac], 0
call fcn.004c7df0
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4c886c
push edi
call fcn.004c7560
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
push ecx
push edx
push eax
push ebp
call fcn.004c7410
mov edi, eax
test edi, edi
je 0x4c886c
mov esi, dword [esi]
test esi, esi
jne 0x4c86f0
jmp 0x4c886c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
mov dword [esp + 0x34], 0
lea ebx, [ebx]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
push ebp
add ebx, 0xbb8
call fcn.004c8330
test eax, eax
je 0x4c886c
lea eax, [esp + 0x30]
push eax
push ebx
call fcn.004c76c0
mov esi, eax
test esi, esi
je 0x4c87ee
nop
movzx eax, word [esi + 4]
mov dword [0x416fac], eax
test eax, eax
je 0x4c8815
lea ecx, [esp + 0x30]
push ecx
push ebx
call fcn.004c76c0
mov esi, eax
test esi, esi
jne 0x4c87d0
cmp dword [esp + 0x34], 0
jne 0x4c8802
call fcn.004c71b0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
mov eax, dword [esp + 0x34]
inc eax
cmp eax, 3
mov dword [esp + 0x34], eax
jl 0x4c87a0
mov eax, dword [0x416fac]
test esi, esi
jne 0x4c8829
test eax, eax
jne 0x4c886c
mov dword [0x416fac], 0x69
jmp 0x4c886c
mov dx, word [esi + 0x14]
mov ebx, dword [esi + 0xc]
mov ecx, dword [esp + 0x30]
mov word [edi + 0x48], dx
mov ax, word [esi + 0x10]
mov word [edi + 0x46], ax
mov dword [edi + 0x54], ecx
push 0
push 0
call fcn.004c76c0
test eax, eax
jne 0x4c8843
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
push edx
push eax
push ebx
push ecx
push 1
push edi
call fcn.004c7df0
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x24]
push edx
call fcn.004cb4e1
mov esi, dword [esp + 0x1c]
add esp, 4
test esi, esi
jne 0x4c888b
test edi, edi
je 0x4c888b
push edi
call fcn.004c7560
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8