Function at 0x41f550
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status

Disassembly:
mov eax, 0x3548
call fcn.00458680
push ebx
mov ebx, dword [esp + 0x3554]
push ebp
mov ebp, dword [esp + 0x3554]
mov al, byte [ebx + 1]
push esi
push edi
mov edi, dword [ebp + 4]
mov esi, ecx
cmp al, 1
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
jne 0x41f9e0
push 1
push 0
push 0
push 0
push 1
push 2
mov byte [ebx], 0
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [esi + 4]
push eax
push ebp
add ecx, 0x36510
call fcn.00442ed0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41f5cf
push 8
push ebx
push edi
mov ecx, esi
mov byte [ebx + 1], 0x5b
call fcn.0041c6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov ax, word [ebx + 2]
mov cl, byte [0x494b70]
mov word [esp + 0x22], ax
mov byte [esp + 0x14c], cl
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x14d]
mov edx, dword [ebx + 4]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 6
mov eax, ecx
mov esi, edi
mov edi, edx
push str.0.0.0.
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 + 0x154]
push ecx
call fcn.0045a6b0
add esp, 0xc
test eax, eax
jne 0x41f706
lea edx, [ebx + 8]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
mov eax, dword [ebp + 0x1c]
dec ecx
add edx, ecx
mov esi, edx
mov dword [esp + 0x18], edx
sub esi, ebx
inc esi
cmp eax, 2
jne 0x41fdae
lea edi, [esi + ebx]
jmp 0x41f678
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 8]
test eax, eax
je 0x41f6d5
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push 8
push edx
push edi
push ebp
push eax
mov dword [esp + 0x30], 1
call fcn.0041c7d0
test eax, eax
je 0x41fdae
cmp byte [edi], 0
je 0x41f6d1
inc esi
inc edi
mov dword [esp + 0x1c], edi
lea edi, [ebx + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfe
cmp esi, ecx
jg 0x41fdae
cmp dword [ebp + 0x1c], 2
je 0x41f670
mov edx, dword [esp + 0x18]
cmp dword [ebp + 0x1c], 2
jne 0x41fdae
lea edi, [edx + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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]
mov cl, byte [0x494b70]
mov edx, dword [ebp + 0x10]
mov byte [esp + 0x1550], cl
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1551]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x24]
cmp ecx, 0xffffffff
je 0x41f76d
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 4]
mov edi, dword [eax + 0x364d8]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*8]
lea eax, [edi + ecx*4]
push eax
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x1558]
push str._s__s_SOCKS4
push ecx
call fcn.004585a3
add esp, 0x10
jmp 0x41f78e
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea edx, [esp + 0x1554]
push str._s_unknown_SOCKS4
push edx
call fcn.004585a3
mov esi, dword [esp + 0x1c]
add esp, 0xc
mov al, byte [0x494b70]
mov ecx, 0x400
mov byte [esp + 0x54c], al
xor eax, eax
lea edi, [esp + 0x54d]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x22]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea edx, [esp + 0x14c]
push eax
push edx
lea eax, [esp + 0x554]
push str.CONNECT__s:_d
push eax
call fcn.004585a3
mov ecx, dword [esi + 4]
add esp, 0x10
mov eax, dword [ecx + 0xa558]
test eax, eax
je 0x41f81c
lea edi, [esp + 0x54c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x1550]
push eax
call fcn.00430d10
mov edi, str.CONNECT
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + ecx + 0x54c]
mov ecx, dword [ebp + 0x24]
cmp ecx, 0xffffffff
je 0x41f93a
mov edx, dword [esi + 4]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*8]
mov eax, dword [edx + 0x364d8]
mov eax, dword [eax + ecx*4 + 0x164]
cmp eax, 0xffffffff
je 0x41f93a
mov ecx, eax
shl ecx, 8
add ecx, eax
lea ecx, [eax + ecx*2]
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*2]
mov ecx, dword [edx + 0x364f8]
lea eax, [ecx + eax*4]
mov ecx, dword [eax + 0x303c]
test ecx, ecx
je 0x41f93a
cmp dword [eax + 0x3048], 1
jne 0x41f93a
mov ecx, dword [eax + 0x1034]
test ecx, ecx
je 0x41f8b8
mov eax, ecx
jmp 0x41f8bb
add eax, 0x31
push eax
push edi
mov ecx, esi
call fcn.00426740
test eax, eax
je 0x41f93a
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x1cb0]
test edx, edx
jne 0x41f913
lea edx, [esp + 0x14c]
add eax, 0x18b0
push edx
push eax
push ebx
call fcn.004585a3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
dec ecx
push ecx
push ebx
push eax
mov ecx, esi
call fcn.0041c6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x18]
push edx
push ecx
mov ecx, esi
call fcn.0041c6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edx, dword [esp + 0x22]
push 1
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp + 8]
and eax, 0xffff
push eax
lea eax, [esp + 0x154]
push eax
push ebp
push ecx
mov ecx, esi
call fcn.00426140
test eax, eax
jne 0x41f985
mov edx, dword [esp + 0x14]
push 0xa
push ebx
push edx
mov ecx, esi
mov byte [ebx + 1], 0x5c
call fcn.0041c6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edx, dword [ebp + 8]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x38]
push eax
push ecx
push edx
mov dword [esp + 0x3c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [esp + 0x3c]
mov cx, word [esp + 0x3a]
mov edi, dword [esp + 0x14]
mov dword [ebx + 2], eax
push 8
mov word [ebx + 4], cx
push ebx
push edi
mov ecx, esi
mov byte [ebx + 1], 0x5a
call fcn.0041c6a0
mov edx, dword [ebp + 8]
push 0
push edi
push edx
push ebp
mov ecx, esi
call fcn.00423f50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
cmp al, 2
jne 0x41fdae
mov al, byte [0x494b70]
mov edx, dword [ebp + 0x10]
mov byte [esp + 0x1550], al
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1551]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x24]
cmp ecx, 0xffffffff
je 0x41fa4a
mov eax, dword [esi + 4]
mov edi, dword [eax + 0x364d8]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*8]
lea eax, [edi + ecx*4]
push eax
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x1558]
push str._s__s_SOCKS4
push ecx
call fcn.004585a3
add esp, 0x10
jmp 0x41fa67
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea edx, [esp + 0x1554]
push str._s_unknown_SOCKS4
push edx
call fcn.004585a3
add esp, 0xc
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0xa558]
test ecx, ecx
je 0x41fb4c
mov dl, byte [0x494b70]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x2555]
mov byte [esp + 0x2554], dl
mov byte [esp + 0x54c], dl
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x54d]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
test eax, eax
je 0x41fade
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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]
mov cx, word [ebx + 2]
mov word [esp + 0x3a], cx
mov edx, dword [esp + 0x3a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea ecx, [esp + 0x2554]
push eax
lea eax, [esp + 0x550]
push eax
push str.BIND__s:_d
push ecx
call fcn.004585a3
lea edi, [esp + 0x2564]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1550]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x1550]
push eax
call fcn.00430d10
add esp, 4
xor edi, edi
mov byte [ebx], 0
push 1
push edi
push edi
push edi
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [esi + 4]
push eax
push ebp
add ecx, 0x36510
call fcn.00442ed0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41fbaa
mov ecx, dword [esp + 0x14]
push 0xa
push ebx
push ecx
mov ecx, esi
mov byte [ebx + 1], 0x5b
call fcn.0041c6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov eax, dword [ebp + 8]
lea edx, [esp + 0x20]
push 0x10
push edx
push eax
mov word [esp + 0x2e], di
mov word [esp + 0x2c], 2
mov dword [esp + 0x30], edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x41fdae
mov ecx, dword [ebp + 8]
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x18]
lea eax, [esp + 0x20]
push edx
push eax
push ecx
mov dword [esp + 0x24], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov edx, dword [esi + 4]
mov cx, word [esp + 0x22]
mov edi, dword [esp + 0x14]
push 8
mov eax, dword [edx + 0xa98c]
mov word [ebx + 2], cx
push ebx
push edi
mov ecx, esi
mov dword [esp + 0x30], eax
mov byte [ebx + 1], 0x5a
mov dword [ebx + 4], eax
call fcn.0041c6a0
test eax, eax
je 0x41fdae
xor eax, eax
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], eax
cmp dword [ebp + 0x1c], 2
jne 0x41fdae
mov eax, dword [esi + 8]
test eax, eax
je 0x41fdae
mov edx, dword [ebp + 8]
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], edx
xor eax, eax
lea ecx, [esp + 0x4c]
cmp dword [ecx], edi
je 0x41fc78
inc eax
add ecx, 4
cmp eax, 1
jb 0x41fc6b
cmp eax, 1
jne 0x41fc89
mov dword [esp + 0x50], edi
mov dword [esp + 0x48], 2
lea eax, [esp + 0x30]
lea ecx, [esp + 0x48]
push eax
push 0
push 0
push ecx
push 0x40
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x41fcc4
mov edx, dword [esi + 4]
mov eax, dword [edx + 0xa9b8]
cmp eax, 0xffffffff
je 0x41fcfc
mov ecx, dword [esp + 0x10]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jg 0x41fdae
jmp 0x41fcfc
test eax, eax
mov dword [esp + 0x10], 0
jl 0x41fdae
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x48]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41fd13
mov eax, dword [ebp + 4]
lea edx, [esp + 0x48]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41fd92
cmp dword [ebp + 0x1c], 2
je 0x41fc4b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x38]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x20], 0x10
call fcn.0041cd20
mov edi, eax
test edi, edi
je 0x41fdae
mov ax, word [esp + 0x3a]
mov ecx, dword [esp + 0x3c]
mov byte [ebx], 0
mov byte [ebx + 1], 0x5a
mov word [ebx + 2], ax
mov dword [ebx + 4], ecx
mov edx, dword [ebp + 4]
push 8
push ebx
push edx
mov ecx, esi
call fcn.0041c6a0
test eax, eax
jne 0x41fd6e
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov eax, dword [esp + 0x14]
push 0
push eax
push edi
push ebp
mov ecx, esi
call fcn.00423f50
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x18]
push 0
push ecx
push ebx
push ebp
push edx
mov ecx, esi
mov dword [esp + 0x2c], 0x1000
call fcn.0041c7d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8