Function at 0x404320
Capabilities:
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1ac
mov dword [esp], 0x10000
call sub.msvcrt.dll_malloc
mov edi, eax
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x1c0]
mov esi, dword [eax + 0x74]
test edi, edi
je 0x4047ba
mov ecx, 0x3e8
mov eax, dword [esp + 0x1c8]
xor edx, edx
div ecx
mov dword [esp + 0x3c], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x34], eax
mov ebx, 0x90312
xor ebp, ebp
cmp ebx, 0x80090318
sete al
cmp ebx, 0x90312
jne 0x4047b0
test ebp, ebp
je 0x404398
test al, al
je 0x404471
cmp dword [esp + 0x1c4], 0
je 0x404466
cmp dword [esp + 0x1c8], 0
je 0x4043c2
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x50], eax
jmp 0x4043d2
mov dword [esp + 0x4c], 0xa
mov dword [esp + 0x50], 0
mov eax, dword [esp + 0x1c0]
mov eax, dword [eax + 4]
mov dword [esp + 0xa0], eax
mov dword [esp + 0x9c], 1
lea eax, [esp + 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [esp + 0x9c]
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
dec eax
jne 0x40445c
mov dword [esp + 0xc], 0
mov eax, 0x10000
sub eax, ebp
mov dword [esp + 8], eax
lea eax, [edi + ebp]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recv]
sub esp, 0x10
test eax, eax
jle 0x40445c
add ebp, eax
jmp 0x404471
mov ebx, 0x80090304
jmp 0x4047bc
mov dword [esp + 0x1c4], 1
mov dword [esp + 0x58], 2
lea eax, [esp + 0x6c]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x54], 0
mov dword [esp + 0x70], 2
mov dword [esp + 0x74], edi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x64], 2
lea eax, [esp + 0x84]
mov dword [esp + 0x68], eax
mov dword [esp + 0x60], 0
mov dword [esp + 0x88], 2
mov dword [esp + 0x84], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x94], 0x11
mov dword [esp + 0x90], 0
mov dword [esp + 0x98], 0
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov ebx, dword [esp + 0x1c0]
cmp dword [ebx + 0x70], 0
je 0x404576
cmp dword [esi + 0x40], 0
mov edx, 0
cmovne edx, eax
mov dword [esp + 0x20], 0
lea ebx, [esp + 0x48]
mov dword [esp + 0x1c], ebx
lea ebx, [esp + 0x60]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x10
mov dword [esp + 0xc], 0x1811c
lea eax, [esp + 0x54]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ecx
call dword [sym.imp.Secur32.dll_AcceptSecurityContext]
sub esp, 0x24
jmp 0x4045d5
mov dword [esp + 0x2c], 0
lea edx, [esp + 0x48]
mov dword [esp + 0x28], edx
lea edx, [esp + 0x60]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
lea edx, [esp + 0x54]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xc19c
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.Secur32.dll_InitializeSecurityContextA
sub esp, 0x30
mov ebx, eax
test eax, eax
sete byte [esp + 0x30]
cmp eax, 0x90312
je 0x404603
cmp byte [esp + 0x30], 0
jne 0x404603
test eax, eax
jns 0x4045f7
test byte [esp + 0x49], 0x40
jne 0x404603
cmp ebx, 0x80090325
jne 0x404772
mov eax, dword [esp + 0x1c0]
cmp dword [eax + 0x70], 0
je 0x40461d
cmp dword [esi + 0x40], 0
jne 0x40461d
mov dword [esi + 0x40], 1
mov edx, dword [esp + 0x84]
test edx, edx
je 0x404688
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x404688
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x8c]
mov dword [esp], eax
call sub.Secur32.dll_FreeContextBuffer
push edx
mov eax, dword [esp + 0x98]
test eax, eax
je 0x404681
mov dword [esp], eax
call sub.Secur32.dll_FreeContextBuffer
push eax
cmp dword [esp + 0x38], 0xffffffff
je 0x4046cb
cmp ebx, 0x80090318
je 0x404377
cmp ebx, 0x80090325
je 0x4046a7
cmp byte [esp + 0x30], 0
je 0x40477e
cmp dword [esp + 0x7c], 5
jne 0x4047bc
mov eax, dword [esp + 0x78]
cmp dword [esi + 0x28], 0
jne 0x404705
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [esi + 0x2c], eax
test eax, eax
jne 0x4046d8
mov dword [esp], edi
call sub.msvcrt.dll_free
jmp 0x4047c6
mov edx, dword [esp + 0x78]
mov dword [esp + 8], edx
sub ebp, edx
mov edx, ebp
add edx, edi
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [esp + 0x78]
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], 2
jmp 0x4047bc
add eax, dword [esi + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, eax
test eax, eax
je 0x4047c6
mov eax, dword [esi + 0x24]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov dword [esp + 0x30], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
sub ebp, eax
mov eax, ebp
add eax, edi
mov dword [esp + 4], eax
mov edx, dword [esp + 0x30]
mov eax, dword [esi + 0x24]
add eax, edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x30]
mov dword [esi + 0x2c], edx
mov eax, dword [esp + 0x78]
add dword [esi + 0x24], eax
jmp 0x4047bc
cmp ebx, 0x80090318
je 0x404377
test ebx, ebx
js 0x4047bc
cmp dword [esp + 0x7c], 5
jne 0x404375
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
sub ebp, eax
mov eax, ebp
add eax, edi
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_memmove
mov ebp, dword [esp + 0x78]
jmp 0x404377
test al, al
jne 0x40438c
jmp 0x4047bc
xor ebx, ebx
mov dword [esp], edi
call sub.msvcrt.dll_free
jmp 0x4047cb
mov ebx, 0x80090304
mov eax, ebx
add esp, 0x1ac
pop ebx
pop esi
pop edi
pop ebp
ret