Function at 0x401e40
Capabilities:
Create thread
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [0x40a054]
mov dword [esp + 0x170], eax
push ebx
xor eax, eax
push esi
push edi
mov byte [esp + 0xf8], 0
mov ecx, 0x1f
lea edi, [esp + 0xf9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x40], 0
mov ecx, 0x1f
lea edi, [esp + 0x41]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x10]
cmp ax, 0x10
jne 0x401f78
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1e
mov dword [esp + 0xfc], eax
push 0x40af94
lea eax, [esp + 0x109]
push eax
mov byte [esp + 0x10c], 0x12
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [0x40afc4]
mov ecx, dword [0x40afc8]
push 0xd9
push 0x2e
lea edx, [esp + 0x100]
push 0x80
push edx
mov dword [esp + 0x130], eax
mov dword [esp + 0x134], eax
mov byte [esp + 0x138], 0x34
mov dword [esp + 0x17c], ecx
call fcn.00401300
mov esi, dword [ebp + 0xc]
add esp, 0x10
push 0
push 0x80
lea eax, [esp + 0x100]
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x401f52
mov ecx, dword [ebp + 8]
push 0
push 0x465
push ecx
push esi
call sub.WS2_32.dll_WSAAsyncSelect
push esi
call sub.WS2_32.dll_closesocket
mov eax, 1
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0x21
push 0x465
push edx
push esi
call sub.WS2_32.dll_WSAAsyncSelect
xor eax, eax
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ax, 1
jne 0x4021c8
mov edi, dword [ebp + 0xc]
push 0
push 0x80
lea eax, [esp + 0x48]
push eax
push edi
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
jne 0x401fcb
mov ecx, dword [ebp + 8]
push 0
push 0x465
push ecx
push edi
call sub.WS2_32.dll_WSAAsyncSelect
push edi
call sub.WS2_32.dll_closesocket
mov eax, 1
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xd9
push 0x2e
lea edx, [esp + 0x48]
push 0x80
push edx
call fcn.00401280
mov esi, dword [ebp + 8]
add esp, 0x10
push 0
push 0x465
push esi
push edi
call sub.WS2_32.dll_WSAAsyncSelect
push edi
call sub.WS2_32.dll_closesocket
cmp byte [esp + 0x48], 1
jne 0x40213a
push esi
call fcn.00401080
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
add esp, 4
push 0
push 0x3fa
push esi
call ebx
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call edi
push 0
push 0x3fb
push esi
call ebx
push eax
call edi
push 0
push 0x409
push esi
call ebx
push eax
call edi
push 0
push 0x408
push esi
call ebx
push eax
call edi
xor eax, eax
mov dx, word [esp + 0x4e]
mov ecx, 0xa
lea edi, [esp + 0x15]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0xc4], 0
mov ecx, 0xc
lea edi, [esp + 0xc5]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x4a]
stosb byte es:[edi], al
mov eax, dword [esp + 0x76]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [esp + 0x14], eax
push 0x1f
lea eax, [esp + 0x5c]
mov dword [esp + 0x1c], ecx
push eax
lea ecx, [esp + 0x26]
push ecx
mov word [esp + 0x28], dx
call edi
push 0xd
lea edx, [esp + 0x7e]
push edx
lea eax, [esp + 0xcc]
push eax
call edi
push 0x40af94
lea ecx, [esp + 0xc8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0xc4]
push edx
push 0x3fb
push esi
call ebx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea eax, [esp + 0x88]
push eax
call dword [0x40ae2c]
mov ecx, dword [0x40afd0]
push ecx
call dword [0x40ae24]
call dword [0x40af7c]
lea edx, [esp + 0x14]
push edx
call dword [0x40af70]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x401900
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor eax, eax
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [esp + 0x49], 0x10
push 0
je 0x4021a8
push 0x4082b8
lea ecx, [esp + 0x62]
push ecx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
test byte [esp + 0x49], 0x20
je 0x4021a6
mov eax, dword [0x40afd8]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
je 0x402182
push 0
push 0
push 0xf5
push 0x408
push esi
call edi
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x409
push esi
call edi
push eax
call dword [sym.imp.USER32.dll_SetFocus]
xor eax, eax
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
mov ecx, dword [esp + 0x17c]
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ax, 0x20
jne 0x4021e8
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
push 0
push 0x465
push edx
push esi
call sub.WS2_32.dll_WSAAsyncSelect
push esi
call sub.WS2_32.dll_closesocket
mov ecx, dword [esp + 0x17c]
xor eax, eax
call fcn.00402837
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret