Function at 0x415eb0
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov eax, 0x50b4
lea ebp, [esp - 0x68]
call fcn.004216d0
push ebx
push esi
push edi
push dword [ebp + 0x78]
lea eax, [ebp - 0x284c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push dword [ebp + 0x70]
mov dword [ebp + 0x60], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x10
mov esi, eax
xor ebx, ebx
lea eax, [ebp + 0x44]
push ebx
push eax
call fcn.00421540
add esp, 0xc
push dword [ebp + 0x74]
mov word [ebp + 0x44], 2
call dword [sym.imp.WS2_32.dll_htons]
push ebx
xor edi, edi
inc edi
push edi
push 2
mov word [ebp + 0x46], ax
mov dword [ebp + 0x48], esi
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x415f2e
mov eax, 0x80040209
jmp 0x4160b0
push 0x10
lea eax, [ebp + 0x44]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
lea eax, [ebp + 0x54]
push eax
push 0x8004667e
push esi
mov dword [ebp + 0x54], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push ebx
push dword [ebp + 0x60]
lea eax, [ebp - 0x284c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x284c]
mov dword [ebp + 0x58], eax
mov dword [ebp + 0x64], ebx
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push edi
push eax
push esi
mov dword [ebp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov dword [ebp + 0x60], ebx
push ebx
push 0x1f4
push ebx
lea eax, [ebp + 0x5c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0x102
je 0x415ffe
cmp eax, ebx
jne 0x415ff5
lea eax, [ebp + 0x18]
push eax
push dword [ebp + 0x5c]
push esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test byte [ebp + 0x18], 1
je 0x415ff5
cmp dword [ebp + 0x1c], ebx
jne 0x415ff5
push ebx
mov eax, 0x27d8
sub eax, dword [ebp + 0x64]
push eax
push dword [ebp + 0x58]
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
je 0x415ffe
jle 0x415fd7
add dword [ebp + 0x58], eax
add dword [ebp + 0x64], eax
cmp dword [ebp + 0x64], 0x27d8
jg 0x415ffe
push dword [ebp + 0x64]
lea eax, [ebp - 0x284c]
push eax
call fcn.00415e15
test al, al
pop ecx
pop ecx
jne 0x415ffe
inc dword [ebp + 0x60]
cmp dword [ebp + 0x60], 5
jl 0x415f81
push ebx
push dword [ebp + 0x5c]
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push dword [ebp + 0x5c]
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push esi
call edi
cmp dword [ebp + 0x64], ebx
jle 0x41602b
push esi
call edi
mov edi, dword [ebp + 0x64]
cmp edi, 0xffffffff
jne 0x416032
mov eax, 0x80040203
jmp 0x4160b0
mov esi, dword [ebp + 0x7c]
push edi
lea eax, [ebp - 0x284c]
push eax
push esi
call fcn.00421200
mov byte [edi + esi], bl
xor eax, eax
mov byte [ebp - 0x504c], bl
mov ecx, 0x9ff
lea edi, [ebp - 0x504b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x504c]
push eax
push esi
call fcn.00415adb
add esp, 0x14
test al, al
jne 0x4160ae
lea eax, [ebp - 0x4c]
push eax
push str.errorCode
push esi
or edi, 0xffffffff
call fcn.00415d53
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x4160a1
lea eax, [ebp - 0x4c]
push eax
call fcn.0042191e
pop ecx
mov edi, eax
mov dword [0x45a060], edi
mov eax, 0x80040211
jmp 0x4160b0
xor eax, eax
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret