Function at 0x40dd20
Capabilities:
Check os version
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x204
push ebx
mov ebx, dword [esp + 0x214]
push ebp
push esi
test ebx, ebx
push edi
mov dword [esp + 0x14], 0
jne 0x40dd4b
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x204
ret
mov ebp, dword [esp + 0x21c]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0xac]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x68]
or ecx, 0xffffffff
mov byte [ebx], 0
lea edx, [esp + 0xac]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.GN_LOCAL_MODE
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40ddc5
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x218]
push edx
push ebx
push eax
call fcn.0040e470
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret
call fcn.00411850
xor ecx, ecx
mov cl, byte [ebp + 0x1c]
dec ecx
je 0x40de1e
dec ecx
je 0x40dde4
sub ecx, 2
je 0x40ddf9
mov ecx, eax
and ecx, 1
cmp cl, 1
je 0x40de29
and eax, 2
cmp al, 2
jne 0x40e45d
mov dword [esp + 0x10], 2
jmp 0x40de31
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x218]
push edx
push ebx
push ebp
push eax
call fcn.0040f420
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret
and eax, 1
cmp al, 1
jne 0x40e45d
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xac]
push ecx
call fcn.004118b0
mov ebx, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x40de58
test bl, 2
je 0x40de58
mov dword [esp + 0x10], 2
jmp 0x40de5d
cmp ebx, 2
jne 0x40deca
push ebp
call fcn.0040e8f0
add esp, 4
cmp eax, 0xffffffff
jne 0x40de9b
push 0x3e8
push 2
push 6
call fcn.00410e40
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40de91
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x204
ret
push eax
push ebp
call fcn.0040e910
add esp, 8
lea edx, [esp + 0x28]
push 0
lea eax, [esp + 0xb0]
push edx
push eax
call fcn.004119e0
add esp, 0xc
test eax, eax
je 0x40df44
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x204
ret
cmp ebx, 1
jne 0x40df19
push ebp
call fcn.0040e8f0
add esp, 4
cmp eax, 0xffffffff
je 0x40deec
push ebp
call fcn.0040e8f0
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
push 6
push 1
push 2
call fcn.00410e40
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40df0f
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x204
ret
push eax
push ebp
call fcn.0040e910
add esp, 8
lea ecx, [esp + 0x28]
push 0
lea edx, [esp + 0xb0]
push ecx
push edx
call fcn.00411670
add esp, 0xc
test eax, eax
je 0x40df48
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x204
ret
mov ebx, dword [esp + 0x10]
mov ecx, 0x68
xor eax, eax
mov edi, 0x42b818
cmp ebx, 2
rep stosd dword es:[edi], eax
mov ax, word [ebp + 0x20]
mov dword [0x42b824], eax
jne 0x40e0b8
cmp word [ebp + 0x458], 0
je 0x40df8a
lea ecx, [ebp + 0x454]
push ecx
call fcn.00412610
add esp, 4
mov word [ebp + 0x458], 0
mov eax, dword [ebp + 0x454]
test eax, eax
je 0x40dff1
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x40dff1
call esi
cmp eax, 0x80000000
jb 0x40dfb2
call esi
cmp al, 4
jb 0x40dff1
push ebp
call fcn.0040e8f0
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
push 0x3e8
push 2
push 6
call fcn.00410e40
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40dfe7
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x204
ret
push eax
push ebp
call fcn.0040e910
add esp, 8
mov eax, dword [ebp + 0x454]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.0040e960
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40e135
push 0x54
call dword [sym.imp.MSVCR71.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x18], ebx
jne 0x40e036
pop edi
pop esi
pop ebp
mov eax, 0xe1
pop ebx
add esp, 0x204
ret
lea esi, [ebx + 4]
xor ecx, ecx
mov edx, esi
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov word [esi], 6
mov ax, word [ebp + 0x1e]
push eax
call fcn.00410f70
lea ecx, [esp + 0x2c]
push esi
push ecx
mov word [esi + 0xc], ax
call fcn.00411950
add esp, 0xc
test eax, eax
jne 0x40e07d
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x204
ret
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp + 0x454]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov word [ebx], 1
call fcn.00412620
add esp, 8
jmp 0x40e135
mov ecx, 0x15
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
mov cx, word [ebp + 0x1e]
mov word [esp + 0x5c], 2
push ecx
call fcn.00410f70
lea edx, [esp + 0x2c]
mov word [esp + 0x62], ax
push edx
call fcn.00410df0
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x60], eax
jne 0x40e101
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x204
ret
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x6c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x58], 1
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x58]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [0x42b818], 0x65
mov dx, word [eax]
and edx, 0x80001fff
jns 0x40e158
dec edx
or edx, 0xffffe000
inc edx
mov ebx, dword [esp + 0x224]
xor ecx, ecx
mov dword [0x42b81c], edx
mov esi, dword [esp + 0x218]
mov cx, word [ebx]
mov edi, 0x42b828
mov dword [0x42b820], ecx
xor ecx, ecx
mov cx, word [ebx]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x68
mov edi, 0x42b9b8
rep stosd dword es:[edi], eax
lea eax, [esp + 0x48]
push eax
call fcn.0040e940
mov ecx, 0x68
xor eax, eax
mov edi, 0x42bb58
rep stosd dword es:[edi], eax
mov ecx, dword [0x42b818]
push ecx
call fcn.00410fa0
mov edx, dword [0x42b81c]
mov dword [0x42bb58], eax
push edx
call fcn.00410fa0
mov dword [0x42bb5c], eax
mov eax, dword [0x42b820]
push eax
call fcn.00410fa0
mov ecx, dword [0x42b824]
mov dword [0x42bb60], eax
push ecx
call fcn.00410fa0
xor ecx, ecx
mov dword [0x42bb64], eax
mov cx, word [ebx]
mov esi, 0x42b828
mov edx, ecx
mov edi, 0x42bb68
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 0x14
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x14]
cmp esi, 0xa
jge 0x40e26b
mov eax, dword [esp + 0x18]
push 0x10
add eax, 4
push eax
push ebp
call fcn.0040e8f0
add esp, 4
push eax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x40e26b
call sub.WS2_32.dll_WSAGetLastError
cmp byte [ebp + 0x1c], 2
je 0x40e25b
cmp eax, 0x274c
je 0x40e25b
inc esi
cmp esi, 0xa
mov dword [esp + 0x14], esi
jl 0x40e218
pop edi
pop esi
pop ebp
mov eax, 0x12d
pop ebx
add esp, 0x204
ret
lea ecx, [esp + 0x48]
mov dword [esp + 0x14], 0
mov ebx, 1
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x14]
mov edi, 4
cmp eax, edi
jge 0x40e25b
xor esi, esi
cmp ebx, esi
je 0x40e2b8
push esi
push 0x1a0
push 0x42bb58
push ebp
call fcn.0040e8f0
add esp, 4
push eax
call sub.WS2_32.dll_send
cmp eax, 0x1a0
jne 0x40dfd7
push ebp
xor ebx, ebx
mov dword [esp + 0x114], esi
call fcn.0040e8f0
mov edx, dword [esp + 0x114]
add esp, 4
mov dword [esp + 0x24], esi
mov dword [esp + edx*4 + 0x114], eax
mov edx, dword [esp + 0x110]
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x110], edx
lea edx, [esp + 0x20]
mov ecx, dword [eax]
push edx
push esi
lea eax, [esp + 0x118]
push esi
push eax
push ebp
mov dword [esp + 0x34], ecx
call fcn.0040e8f0
add esp, 4
inc eax
push eax
call fcn.00410e70
add esp, 0x14
cmp eax, 0xffffffff
je 0x40dfd7
cmp eax, esi
je 0x40e402
push esi
mov ecx, 0x68
xor eax, eax
mov edi, 0x42bb58
push 0x1a0
push 0x42bb58
rep stosd dword es:[edi], eax
push ebp
call fcn.0040e8f0
add esp, 4
push eax
call sub.WS2_32.dll_recv
cmp eax, 0x1a0
jne 0x40dfd7
mov ecx, 0x68
xor eax, eax
mov edi, 0x42b9b8
rep stosd dword es:[edi], eax
mov ecx, dword [0x42bb58]
push ecx
call fcn.00410fa0
mov edx, dword [0x42bb5c]
mov dword [0x42b9b8], eax
push edx
call fcn.00410fa0
mov dword [0x42b9bc], eax
mov eax, dword [0x42bb60]
push eax
call fcn.00410fa0
mov ecx, dword [0x42bb64]
mov dword [0x42b9c0], eax
push ecx
call fcn.00410fa0
mov dx, word [0x42b9c0]
mov dword [0x42b9c4], eax
mov eax, dword [esp + 0x234]
mov esi, 0x42bb68
mov edi, 0x42b9c8
add esp, 0x10
mov word [eax], dx
mov ecx, dword [0x42b9c0]
and ecx, 0xffff
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
cmp ecx, 1
je 0x40e42b
mov edx, dword [0x42b9bc]
mov esi, dword [0x42b81c]
cmp edx, esi
je 0x40e41f
jmp 0x40e280
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
inc ecx
add eax, edi
mov ebx, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
jmp 0x40e280
cmp ecx, 1
je 0x40e42b
mov ecx, dword [esp + 0x18]
inc word [ecx]
mov edi, dword [esp + 0x220]
xor ecx, ecx
mov esi, 0x42b9c8
mov dword [edi], 0
mov cx, word [eax]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret
pop edi
pop esi
pop ebp
mov eax, 0x133
pop ebx
add esp, 0x204
ret