Function at 0x401370
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, 0x2f84
call fcn.00409860
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
xor ebx, ebx
mov al, 8
push edi
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], al
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], al
call ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
fild qword [esp + 0x14]
fstp qword [esp + 0x2c]
call fcn.00401d80
mov eax, dword [0x43146c]
push eax
mov ecx, dword [eax]
lea eax, [esp + 0x18]
push ecx
push eax
mov ecx, 0x431468
call fcn.004082c0
mov esi, 0x431480
fld qword [esi + 0x2720]
fmul qword [0x40a190]
fstp qword [esp + 0x5c]
call ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
fild qword [esp + 0x14]
fsub qword [esp + 0x2c]
fsubr qword [esp + 0x5c]
fcom qword [0x40a188]
fnstsw ax
test ah, 0x41
jne 0x401416
fmul qword [0x40a190]
call sub.MSVCRT.dll__ftol
push edx
push eax
call fcn.00401660
add esp, 8
jmp 0x401418
fstp st(0)
call ebp
mov dword [esp + 0x44], eax
mov ax, word [esi]
mov dword [esp + 0x48], ebx
cmp ax, 2
fild qword [esp + 0x44]
fstp qword [esp + 0x2c]
jne 0x4014b1
mov ecx, dword [esp + 0x2f98]
mov word [esp + 0x64], ax
push ecx
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x2f9c]
mov dword [esp + 0x68], eax
push edx
call sub.WS2_32.dll_htons
push ebx
push 1
push 2
mov word [esp + 0x72], ax
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
je 0x40162a
lea eax, [esp + 0x64]
push 0x10
push eax
push edi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x40163a
mov ecx, dword [esi + 4]
lea edx, [esp + 0x3c]
lea eax, [esp + 0x4c]
mov dword [esp + 0x3c], ecx
push edx
push eax
mov ecx, 0x431468
mov dword [esp + 0x48], ebx
call fcn.00408390
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0x10], edi
jmp 0x40160d
cmp ax, 3
jne 0x4014e8
mov edx, dword [esi + 4]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x7c]
push eax
push ecx
mov ecx, 0x431468
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ebx
call fcn.00408390
mov edx, dword [esp + 0x7c]
mov eax, dword [edx + 0x10]
push eax
call sub.WS2_32.dll_closesocket
jmp 0x40160d
cmp ax, bx
jne 0x401565
mov ecx, 0x9c4
xor eax, eax
lea edi, [esp + 0x884]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x12]
lea eax, [esp + 0x884]
push ecx
mov ecx, dword [esi + 8]
push edx
push eax
lea edx, [esi + 0xc]
push ecx
push edx
call fcn.00401190
add esp, 0x14
lea ecx, [esp + 0x34]
mov edi, eax
mov eax, dword [esi + 4]
lea edx, [esp + 0x74]
push ecx
push edx
mov ecx, 0x431468
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
call fcn.00408390
mov ecx, dword [esp + 0x74]
push ebx
lea eax, [esp + 0x888]
push edi
mov edx, dword [ecx + 0x10]
push eax
push edx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x401640
jmp 0x40160d
cmp ax, 1
jne 0x40160d
mov eax, dword [esi + 4]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x54]
push ecx
push edx
mov ecx, 0x431468
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
call fcn.00408390
mov ecx, dword [esp + 0x54]
push ebx
lea eax, [esp + 0x88]
push 0x800
mov edx, dword [ecx + 0x10]
push eax
push edx
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x401640
cmp dword [esi + 8], 3
jle 0x40160d
lea edi, [esi + 0xc]
push 0x431298
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4015e4
mov al, byte [esp + 0xa0]
mov cl, byte [esp + 0xa1]
mov byte [esp + 0x12], al
mov byte [esp + 0x13], cl
push 0x431290
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x40160d
mov dl, byte [esp + 0xa4]
mov al, byte [esp + 0xa5]
mov byte [esp + 0x10], dl
mov byte [esp + 0x11], al
add esi, 0x2728
cmp esi, 0x5ffd08
jl 0x4013cc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f84
ret
call fcn.00401310
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f84
ret
push edi
call sub.WS2_32.dll_closesocket
call fcn.00401310
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f84
ret