Function at 0x401b3d
Capabilities:
Accept command line arguments
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee4
pushfd
push edx
btr edx, 0x12
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
packssdw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
mov edi, dword [ebp + 8]
pushfd
push ecx
shl ecx, 5
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push ecx
call fcn.00401d89
pop ecx
jmp 0x401b91
push 4
push 0x1000
push 0x2000
push 0
call sub.KERNEL32.DLL_VirtualAlloc
pushfd
push ebx
ror ebx, 0x1e
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pushfd
push eax
seta al
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
mov dword [ebp - 4], eax
test eax, eax
pushfd
push ecx
rcr ecx, 0x19
pop ecx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
punpckhwd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
je 0x401d5a
mov word [ebp - 0x118], 2
mov dword [ebp - 0x108], 2
push dword [edi]
pop dword [ebp - 0x104]
push dword [edi + 4]
pop dword [ebp - 0x100]
pushfd
push esi
bt esi, 3
pop esi
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
psubw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
push 0
push 0
push 0
lea eax, [ebp - 0x108]
push eax
push 0
call sub.wsock32.dll_select
cmp eax, 0
jae 0x401c42
jmp 0x401d5a
lea eax, [ebp - 0x108]
push eax
push dword [edi]
call sub.wsock32.dll___WSAFDIsSet
or eax, eax
je 0x401d0e
push 0
push 0x2000
push dword [ebp - 4]
push dword [edi]
call sub.wsock32.dll_recv
or eax, eax
je 0x401d0c
cmp eax, 0xffffffff
je 0x401d0c
mov dword [ebp - 0x11c], eax
cmp byte [ebp - 1], 1
jne 0x401cc2
pushfd
push ebx
shl ebx, 0x12
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push edx
push edx
pushfd
cmovl edx, edx
popfd
pop edx
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
mov eax, 0xa
pushfd
push ecx
btr ecx, 0x11
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
sub dword [ebp - 0x11c], eax
jmp 0x401cf7
cmp byte [ebp - 1], 3
jne 0x401cf7
xor eax, eax
pushfd
push eax
btc eax, 0x13
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ebx
push esi
pushfd
cmovae ebx, esi
popfd
pop esi
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
mov al, byte [ebp]
add eax, 7
sub dword [ebp - 0x11c], eax
add eax, dword [ebp - 4]
push 0
push 0x2000
push eax
push dword [edi + 4]
call sub.wsock32.dll_send
jmp 0x401d0e
jmp 0x401d5a
lea eax, [ebp - 0x108]
push eax
push dword [edi + 4]
call sub.wsock32.dll___WSAFDIsSet
or eax, eax
je 0x401d55
push 0
push 0x1efa
lea eax, [ebp + 0x102]
push eax
push dword [edi + 4]
call sub.wsock32.dll_recv
or eax, eax
je 0x401d53
cmp eax, 0xffffffff
je 0x401d53
push 0
push 0x2000
push dword [ebp - 4]
push dword [edi]
call sub.wsock32.dll_send
jmp 0x401d55
jmp 0x401d5a
jmp 0x401bee
pushfd
push edx
rcr edx, 0xe
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pushfd
push ecx
setle cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_VirtualFree
leave
ret 4