Function at 0x523860
Capabilities:
Check os version
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x218
push ebx
push ebp
push esi
push edi
xor edx, edx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], dl
mov ebx, dword [esp + 0x234]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x18
mov dword [esp + 0x30], eax
lea edi, [esp + 0xc1]
mov dword [esp + 0x34], eax
cmp ebx, edx
mov dword [esp + 0x38], eax
mov byte [esp + 0xc0], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x14], edx
mov dword [esp + 0x2c], edx
stosb byte es:[edi], al
jne 0x5238c7
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x218
ret
mov ebp, dword [esp + 0x230]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0xc0]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x68]
or ecx, 0xffffffff
mov byte [ebx], 0
lea edx, [esp + 0xc0]
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 + 0xc4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x523941
mov edx, dword [esp + 0x238]
mov eax, dword [esp + 0x22c]
push edx
push ebx
push eax
call fcn.00526280
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
call fcn.00526a70
xor ecx, ecx
mov cl, byte [ebp + 0x1c]
dec ecx
je 0x52399a
dec ecx
je 0x523960
sub ecx, 2
je 0x523975
mov ecx, eax
and ecx, 1
cmp cl, 1
je 0x5239a5
and eax, 2
cmp al, 2
jne 0x524012
mov dword [esp + 0x10], 2
jmp 0x5239ad
mov edx, dword [esp + 0x238]
mov eax, dword [esp + 0x22c]
push edx
push ebx
push ebp
push eax
call fcn.00524b20
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
and eax, 1
cmp al, 1
jne 0x524012
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc0]
push ecx
call fcn.00526ad0
mov ebx, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x5239d4
test bl, 2
je 0x5239d4
mov dword [esp + 0x10], 2
jmp 0x5239d9
cmp ebx, 2
jne 0x523a46
push ebp
call fcn.00524030
add esp, 4
cmp eax, 0xffffffff
jne 0x523a17
push 0x3e8
push 2
push 6
call fcn.00527190
add esp, 0xc
cmp eax, 0xffffffff
jne 0x523a0d
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x218
ret
push eax
push ebp
call fcn.00524050
add esp, 8
lea edx, [esp + 0x4c]
push 0
lea eax, [esp + 0xc4]
push edx
push eax
call fcn.00526c00
add esp, 0xc
test eax, eax
je 0x523ac0
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x218
ret
cmp ebx, 1
jne 0x523a95
push ebp
call fcn.00524030
add esp, 4
cmp eax, 0xffffffff
je 0x523a68
push ebp
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
push 6
push 1
push 2
call fcn.00527190
add esp, 0xc
cmp eax, 0xffffffff
jne 0x523a8b
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x218
ret
push eax
push ebp
call fcn.00524050
add esp, 8
lea ecx, [esp + 0x4c]
push 0
lea edx, [esp + 0xc4]
push ecx
push edx
call fcn.00526880
add esp, 0xc
test eax, eax
je 0x523ac4
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x218
ret
mov ebx, dword [esp + 0x10]
mov ecx, 0x68
xor eax, eax
mov edi, 0x549990
cmp ebx, 2
rep stosd dword es:[edi], eax
mov ax, word [ebp + 0x20]
mov dword [0x54999c], eax
jne 0x523c37
cmp word [ebp + 0x458], 0
je 0x523b06
lea ecx, [ebp + 0x454]
push ecx
call fcn.00528280
add esp, 4
mov word [ebp + 0x458], 0
mov eax, dword [ebp + 0x454]
test eax, eax
je 0x523b6d
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x523b6d
call esi
cmp eax, 0x80000000
jb 0x523b2e
call esi
cmp al, 4
jb 0x523b6d
push ebp
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
push 0x3e8
push 2
push 6
call fcn.00527190
add esp, 0xc
cmp eax, 0xffffffff
jne 0x523b63
pop edi
pop esi
pop ebp
mov eax, 0x135
pop ebx
add esp, 0x218
ret
push eax
push ebp
call fcn.00524050
add esp, 8
mov eax, dword [ebp + 0x454]
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.005240a0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x523cb7
push 0x54
call dword [sym.imp.MSVCR90.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x18], ebx
jne 0x523bb2
pop edi
pop esi
pop ebp
mov eax, 0xe1
pop ebx
add esp, 0x218
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.005272c0
lea ecx, [esp + 0x50]
push esi
push ecx
mov word [esi + 0xc], ax
call fcn.00526b70
add esp, 0xc
test eax, eax
jne 0x523bf9
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x218
ret
lea edi, [esp + 0x4c]
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.00528290
add esp, 8
jmp 0x523cb7
mov ecx, 0x15
xor eax, eax
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
mov cx, word [ebp + 0x1e]
mov word [esp + 0x70], 2
push ecx
call fcn.005272c0
lea edx, [esp + 0x50]
mov word [esp + 0x76], ax
push edx
call fcn.00527140
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x74], eax
jne 0x523c80
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x218
ret
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x6c], 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 + 0x6c]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [0x549990], 0x65
mov dx, word [eax]
and edx, 0x80001fff
jns 0x523cda
dec edx
or edx, 0xffffe000
inc edx
mov ebx, dword [esp + 0x238]
xor ecx, ecx
mov dword [0x549994], edx
mov esi, dword [esp + 0x22c]
mov cx, word [ebx]
mov edi, 0x5499a0
mov dword [0x549998], 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, 0x549b30
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push eax
call fcn.00524080
mov ecx, 0x68
xor eax, eax
mov edi, 0x549cd0
rep stosd dword es:[edi], eax
mov ecx, dword [0x549990]
push ecx
call fcn.005272f0
mov edx, dword [0x549994]
mov dword [0x549cd0], eax
push edx
call fcn.005272f0
mov dword [0x549cd4], eax
mov eax, dword [0x549998]
push eax
call fcn.005272f0
mov ecx, dword [0x54999c]
mov dword [0x549cd8], eax
push ecx
call fcn.005272f0
xor ecx, ecx
mov dword [0x549cdc], eax
mov cx, word [ebx]
mov esi, 0x5499a0
mov edx, ecx
mov edi, 0x549ce0
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 0x523ded
mov eax, dword [esp + 0x18]
push 0x10
add eax, 4
push eax
push ebp
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x523ded
call sub.WS2_32.dll_WSAGetLastError
cmp byte [ebp + 0x1c], 2
je 0x523ddd
cmp eax, 0x274c
je 0x523ddd
inc esi
cmp esi, 0xa
mov dword [esp + 0x14], esi
jl 0x523d9a
pop edi
pop esi
pop ebp
mov eax, 0x12d
pop ebx
add esp, 0x218
ret
lea ecx, [esp + 0x2c]
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 0x523ddd
xor esi, esi
cmp ebx, esi
je 0x523e3a
push esi
push 0x1a0
push 0x549cd0
push ebp
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_send
cmp eax, 0x1a0
jne 0x523b53
xor edx, edx
lea eax, [esp + 0x20]
mov dword [esp + 0x3c], edx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x40], edx
push eax
mov dword [esp + 0x48], edx
push ecx
push ebp
mov dword [esp + 0x2c], 0x10
mov dword [esp + 0x54], edx
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_getsockname
push ebp
xor ebx, ebx
mov dword [esp + 0x128], esi
call fcn.00524030
mov edx, dword [esp + 0x128]
add esp, 4
mov dword [esp + 0x28], esi
mov dword [esp + edx*4 + 0x128], eax
mov edx, dword [esp + 0x124]
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x124], edx
lea edx, [esp + 0x24]
mov ecx, dword [eax]
push edx
push esi
lea eax, [esp + 0x12c]
push esi
push eax
push ebp
mov dword [esp + 0x38], ecx
call fcn.00524030
add esp, 4
inc eax
push eax
call fcn.005271c0
add esp, 0x14
cmp eax, 0xffffffff
je 0x523b53
cmp eax, esi
je 0x523fb7
push esi
mov ecx, 0x68
xor eax, eax
mov edi, 0x549cd0
push 0x1a0
push 0x549cd0
rep stosd dword es:[edi], eax
push ebp
call fcn.00524030
add esp, 4
push eax
call sub.WS2_32.dll_recv
cmp eax, 0x1a0
jne 0x523b53
mov ecx, 0x68
xor eax, eax
mov edi, 0x549b30
rep stosd dword es:[edi], eax
mov ecx, dword [0x549cd0]
push ecx
call fcn.005272f0
mov edx, dword [0x549cd4]
mov dword [0x549b30], eax
push edx
call fcn.005272f0
mov dword [0x549b34], eax
mov eax, dword [0x549cd8]
push eax
call fcn.005272f0
mov ecx, dword [0x549cdc]
mov dword [0x549b38], eax
push ecx
call fcn.005272f0
mov dx, word [0x549b38]
mov dword [0x549b3c], eax
mov eax, dword [esp + 0x248]
mov esi, 0x549ce0
mov edi, 0x549b40
add esp, 0x10
mov word [eax], dx
mov ecx, dword [0x549b38]
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 0x523fe0
mov edx, dword [0x549b34]
mov esi, dword [0x549994]
cmp edx, esi
je 0x523fd4
jmp 0x523e02
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 0x523e02
cmp ecx, 1
je 0x523fe0
mov ecx, dword [esp + 0x18]
inc word [ecx]
mov edi, dword [esp + 0x234]
xor ecx, ecx
mov esi, 0x549b40
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, 0x218
ret
pop edi
pop esi
pop ebp
mov eax, 0x133
pop ebx
add esp, 0x218
ret