Function at 0x40b050
Capabilities:
Connect socket
Get hostname
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x224
mov al, byte [0x423fa4]
mov byte [esp + 0x58], al
push ebx
push esi
xor eax, eax
push edi
mov ecx, 0x18
lea edi, [esp + 0x65]
push ebp
mov ebp, 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [esp + 0x240], eax
jne 0x40b091
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, dword [esp + 0x240]
mov byte [eax], 0
call fcn.00408880
cmp eax, 1
jne 0x40b0a7
xor ebp, ebp
lea edi, [esp + 0xcc]
xor eax, eax
mov ecx, 0x19
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x23c]
mov ecx, 0xffffffff
sub eax, eax
lea edi, [ebx + 2]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0xcc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push str.RNBO_SPN_LOCAL
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xd0]
push ecx
call fcn.0041582d
add esp, 8
test eax, eax
jne 0x40b126
cmp ebp, 1
jne 0x40b126
mov eax, dword [esp + 0x240]
mov esi, dword [esp + 0x238]
push eax
push esi
call fcn.0040d090
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [esp + 0xcc]
push str.RNBO_SPN_LOCAL
push eax
call fcn.0041582d
add esp, 8
test eax, eax
jne 0x40b177
test ebp, ebp
jne 0x40b177
lea eax, [esp + 0x68]
push 0x64
push eax
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x40b19f
mov eax, dword [str.127.0.0.1]
mov ebp, dword [0x425050]
mov ecx, str.127.0.0.1
lea edx, [esp + 0x68]
mov cx, word [ecx + 8]
mov dword [edx], eax
mov dword [edx + 4], ebp
mov word [edx + 8], cx
jmp 0x40b19f
lea edi, [esp + 0xcc]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00408f20
xor ecx, ecx
mov cx, word [ebx + 0x74]
dec ecx
cmp ecx, 7
ja case.0x40b1b8.5
xor edx, edx
mov dl, byte [ecx + 0x40b8a0]
jmp dword [edx*4 + 0x40b88c]
test al, 1
je 0x40b1cd
mov dword [esp + 0x10], 1
jmp 0x40b247
test al, 2
jne 0x40b23f
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 1
je 0x40b1ef
mov dword [esp + 0x10], 1
jmp 0x40b247
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 2
jne 0x40b23f
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, dword [esp + 0x240]
mov esi, dword [esp + 0x238]
push eax
push ebx
push esi
call fcn.0040b960
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 2
je 0x40b87b
mov dword [esp + 0x10], 2
lea eax, [esp + 0x68]
push eax
call fcn.00408f80
add esp, 4
test eax, eax
jne 0x40b267
test byte [esp + 0x10], 2
je 0x40b267
mov dword [esp + 0x10], 2
push ebx
call fcn.0040a240
add esp, 4
cmp eax, 0xffffffff
jne 0x40b2b4
cmp dword [esp + 0x10], 2
jne 0x40b287
push 0x3e8
push 2
push 6
jmp 0x40b28d
push 0x11
push 2
push 2
call fcn.00409ce0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40b2aa
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.0040a260
add esp, 8
lea eax, [esp + 0x38]
push 0
lea ecx, [esp + 0x6c]
push eax
cmp dword [esp + 0x18], 2
push ecx
jne 0x40b2e3
call fcn.004090a0
add esp, 0xc
test eax, eax
je 0x40b2ff
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
call fcn.00408ca0
add esp, 0xc
test eax, eax
je 0x40b2ff
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [0x4251f4], 0
je 0x40b320
call fcn.0040b8b0
push eax
call fcn.00405750
mov dword [0x4251f4], 0
add esp, 4
call fcn.004087f0
mov dword [0x426c04], eax
call fcn.0040b8b0
cmp dword [eax], 0
je 0x40b398
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x40b398
call esi
cmp eax, 0x80000000
jb 0x40b352
call esi
cmp al, 4
jb 0x40b398
cmp dword [esp + 0x10], 2
jne 0x40b398
push ebx
call fcn.0040a240
add esp, 4
push eax
call sub.WSOCK32.dll_closesocket
push 0x3e8
push 2
push 6
call fcn.00409ce0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40b38e
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.0040a260
add esp, 8
lea eax, [esp + 0x38]
push eax
call fcn.0040b8b0
mov eax, dword [eax]
push eax
call fcn.0040b8c0
add esp, 8
mov ebp, eax
test ebp, ebp
jne 0x40b4ad
push 0x58
call fcn.00413664
add esp, 4
mov ebp, eax
test ebp, ebp
jne 0x40b3d7
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [esp + 0x10], 2
jne 0x40b427
lea esi, [ebp + 8]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 6
call fcn.0040a2a0
push eax
call fcn.00409e10
mov word [esi + 0xc], ax
add esp, 4
lea eax, [esp + 0x38]
push esi
push eax
call fcn.00409020
add esp, 8
test eax, eax
jne 0x40b473
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [ebp + 8]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov word [eax], 2
call fcn.0040a2a0
push eax
call fcn.00409e10
mov word [ebp + 0xa], ax
lea ecx, [esp + 0x3c]
add esp, 4
push ecx
call fcn.00409c80
add esp, 4
mov dword [ebp + 0xc], eax
cmp eax, 0xffffffff
jne 0x40b473
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea edi, [esp + 0x38]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [ebp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp], 1
call fcn.0040b8b0
push eax
call fcn.00405760
add esp, 8
mov dword [0x426bf8], 0x3f
mov eax, dword [ebp]
mov esi, dword [esp + 0x238]
and eax, 0x1fff
mov edi, esi
mov ecx, 0xffffffff
mov dword [0x426bfc], eax
mov dword [0x426c00], 0
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
mov edi, 0x426c08
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x426a48
xor eax, eax
mov ecx, 0x68
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov edi, 0x4268a0
push eax
call fcn.0040b030
xor eax, eax
mov ecx, 0x68
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], 1
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, dword [0x426bf8]
push ecx
call fcn.00409e40
add esp, 4
mov ecx, dword [0x426bfc]
mov dword [0x4268a0], eax
push ecx
call fcn.00409e40
add esp, 4
mov ecx, dword [0x426c00]
mov dword [0x4268a4], eax
push ecx
call fcn.00409e40
add esp, 4
mov ecx, dword [0x426c04]
mov edi, 0x426c08
mov dword [0x4268a8], eax
push ecx
call fcn.00409e40
add esp, 4
mov ecx, 0xffffffff
mov dword [0x4268ac], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x4268b0
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x2c]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x38]
cmp dword [esp + 0x18], eax
jae 0x40b80b
cmp dword [esp + 0x10], 2
jne 0x40b615
push 0x10
lea eax, [ebp + 8]
push eax
push ebx
call fcn.0040a240
add esp, 4
push eax
call sub.WSOCK32.dll_connect
cmp dword [esp + 0x14], 0
je 0x40b64b
push 0
push 0x1a0
push 0x4268a0
push ebx
call fcn.0040a240
add esp, 4
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
je 0x40b64b
call sub.WSOCK32.dll_WSAGetLastError
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [esp + 0x14], 0
je 0x40b64b
push 0x10
lea eax, [ebp + 8]
push eax
push 0
push 0x1a0
push 0x4268a0
push ebx
call fcn.0040a240
add esp, 4
push eax
call fcn.00409d90
add esp, 0x18
cmp eax, 0x1a0
jne 0x40b822
mov dword [esp + 0x14], 0
mov dword [esp + 0x130], 0
push ebx
call fcn.0040a240
mov dword [esp + 0x138], eax
add esp, 4
mov eax, dword [esp + 0x18]
inc dword [esp + 0x130]
mov dword [esp + 0x28], 0
mov ecx, dword [eax]
lea eax, [esp + 0x130]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push eax
push ebx
call fcn.0040a240
add esp, 4
inc eax
push eax
call fcn.00409d10
add esp, 0x14
cmp eax, 0xffffffff
je 0x40b7dc
test eax, eax
je 0x40b7f3
mov edi, 0x4268a0
xor eax, eax
mov dword [esp + 0x20], 0x10
mov ecx, 0x68
rep stosd dword es:[edi], eax
cmp dword [esp + 0x10], 2
jne 0x40b70a
push eax
push 0x1a0
push 0x4268a0
push ebx
call fcn.0040a240
add esp, 4
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x1a0
je 0x40b73b
mov eax, 0x6c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [esp + 0x20]
lea ecx, [esp + 0x58]
push eax
push ecx
push 0
push 0x1a0
push 0x4268a0
push ebx
call fcn.0040a240
add esp, 4
push eax
call fcn.00409dd0
add esp, 0x18
cmp eax, 0xffffffff
je 0x40b832
mov eax, dword [0x4268a0]
mov edi, 0x4268b0
push eax
call fcn.00409e40
add esp, 4
mov dword [0x426a48], eax
mov eax, dword [0x4268a4]
push eax
call fcn.00409e40
add esp, 4
mov dword [0x426a4c], eax
mov eax, dword [0x4268a8]
push eax
call fcn.00409e40
add esp, 4
mov dword [0x426a50], eax
mov eax, dword [0x4268ac]
push eax
call fcn.00409e40
add esp, 4
mov ecx, 0xffffffff
mov dword [0x426a54], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x426a58
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
jne 0x40b7c5
lea esi, [ebp + 0xc]
lea edi, [esp + 0x5c]
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
jne 0x40b800
mov eax, dword [0x426a4c]
cmp dword [0x426bfc], eax
jne 0x40b800
mov dword [esp + 0x1c], 1
jmp 0x40b800
cmp eax, 0x2714
je 0x40b800
mov eax, 0x6d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov dword [esp + 0x14], 1
add dword [esp + 0x18], 4
cmp dword [esp + 0x1c], 0
je 0x40b5ad
cmp dword [esp + 0x1c], 1
je 0x40b842
mov eax, 0x3c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x6c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov edi, 0x426a58
mov ecx, 0xffffffff
inc dword [ebp]
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [esp + 0x240]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret