Function at 0x4a1c60
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e2a7b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x244
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 4]
mov eax, 1
xor ebx, ebx
add esi, eax
mov dword [ebp - 0x250], ebx
cmp byte [ebp + 8], bl
je 0x4a1d05
mov ecx, dword [edi + 4]
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
call fcn.004a0ba0
cmp dword [ebp - 0x250], ebx
jne 0x4a1ce2
mov ecx, dword [ebp - 0x14]
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
imul dword [ebp - 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4a1cf6
lea edx, [ebp - 0x14]
push edx
push ebx
lea eax, [ebp - 0x250]
push eax
push ebx
push esi
call dword [sym.imp.WS2_32.dll_select]
call fcn.004a0b00
mov cl, byte [edi]
test cl, cl
jne 0x4a262c
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 8]
mov edx, 2
mov word [ebp - 0x24], dx
cmp eax, ebx
je 0x4a1d34
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20], eax
movzx eax, word [edi + 0xc]
push eax
jmp 0x4a1d4c
mov ecx, dword [0x6f1eec]
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
movzx edx, word [0x6f1ee8]
mov dword [ebp - 0x20], eax
push edx
mov ebx, dword [sym.imp.WS2_32.dll_htons]
call ebx
mov ecx, dword [edi + 4]
mov word [ebp - 0x22], ax
push 0x10
lea eax, [ebp - 0x24]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4a1e6d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x4a1d89
cmp eax, 0x2733
jne 0x4a2141
mov ecx, dword [ebp - 0x250]
xor eax, eax
test ecx, ecx
je 0x4a1db7
jmp 0x4a1da0
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0x250]
cmp dword [ebp + eax*4 - 0x24c], edx
je 0x4a1db7
inc eax
cmp eax, ecx
jb 0x4a1da0
cmp eax, ecx
jne 0x4a1dd0
cmp ecx, 0x40
jae 0x4a1dd0
mov ecx, dword [edi + 4]
mov dword [ebp + eax*4 - 0x24c], ecx
inc dword [ebp - 0x250]
mov dword [ebp - 0x14], 0xa
mov dword [ebp - 0x10], 0
call fcn.004a0ba0
cmp dword [ebp - 0x250], 0
jne 0x4a1e14
mov ecx, dword [ebp - 0x14]
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
imul dword [ebp - 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
jmp 0x4a1e2c
lea edx, [ebp - 0x14]
push edx
push 0
lea eax, [ebp - 0x250]
push eax
push 0
push esi
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.004a0b00
mov cl, byte [edi]
test cl, cl
jne 0x4a262c
test esi, esi
jne 0x4a1e53
pop edi
lea eax, [esi + 6]
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
js 0x4a2141
mov edx, dword [edi + 4]
push edx
call fcn.004a3ee0
add esp, 4
test eax, eax
jne 0x4a2141
mov edx, dword [edi + 4]
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x24]
push ecx
push edx
mov dword [ebp - 0x148], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x4a2141
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [0x6f1ebc], eax
xor eax, eax
cmp dword [edi + 8], eax
je 0x4a262c
lea ecx, [ebp - 0x128]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], ecx
mov dword [ebp - 0x12c], 0x100
mov byte [ebp - 0x28], al
cmp byte [edi + 0xe], 4
mov dword [ebp - 4], eax
jne 0x4a2157
movzx edx, word [0x6f1ee8]
mov eax, 2
push edx
mov dword [ebp - 0x134], eax
mov word [ebp - 0x128], 0x104
mov dword [ebp - 0x130], eax
call ebx
mov esi, dword [ebp - 0x130]
add esi, 2
movzx ebx, ax
cmp esi, dword [ebp - 0x134]
jbe 0x4a1f2c
cmp esi, dword [ebp - 0x12c]
jbe 0x4a1f26
push esi
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov dword [ebp - 0x134], esi
mov ecx, dword [ebp - 0x130]
mov eax, dword [ebp - 0x138]
mov edx, dword [0x6f1eec]
mov word [ecx + eax], bx
add dword [ebp - 0x130], 2
push edx
call dword [sym.imp.WS2_32.dll_htonl]
mov esi, dword [ebp - 0x130]
add esi, 4
mov ebx, eax
cmp esi, dword [ebp - 0x134]
jbe 0x4a1f7d
cmp esi, dword [ebp - 0x12c]
jbe 0x4a1f77
push esi
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov dword [ebp - 0x134], esi
mov ecx, dword [ebp - 0x130]
mov eax, dword [ebp - 0x138]
mov dword [ecx + eax], ebx
mov esi, dword [ebp - 0x130]
add esi, 4
mov dword [ebp - 0x130], esi
inc esi
cmp esi, dword [ebp - 0x134]
jbe 0x4a1fbe
cmp esi, dword [ebp - 0x12c]
jbe 0x4a1fb8
push esi
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov dword [ebp - 0x134], esi
mov eax, dword [ebp - 0x130]
mov edx, dword [ebp - 0x138]
mov byte [eax + edx], 0
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x134]
inc dword [ebp - 0x130]
push ecx
mov ecx, dword [ebp - 0x138]
call fcn.004a07b0
mov dl, byte [edi]
add esp, 4
mov esi, eax
test dl, dl
je 0x4a2035
mov eax, dword [ebp - 0x138]
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp eax, ecx
je 0x4a262c
cmp byte [ebp - 0x28], 0
jne 0x4a262c
push eax
call fcn.0040107c
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4a2072
mov eax, dword [ebp - 0x138]
lea edx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp eax, edx
je 0x4a205f
cmp byte [ebp - 0x28], 0
jne 0x4a205f
push eax
call fcn.0040107c
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov esi, 8
cmp dword [ebp - 0x134], esi
jae 0x4a2093
cmp dword [ebp - 0x12c], esi
jae 0x4a2093
push esi
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov eax, dword [ebp - 0x138]
push 0xa
mov ecx, esi
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x130], 0
call fcn.004a0c20
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
jne 0x4a1ff4
test esi, esi
jne 0x4a2039
mov eax, dword [ebp - 0x130]
lea ecx, [eax + 1]
cmp ecx, dword [ebp - 0x134]
jbe 0x4a20f5
push 0x637c4c
lea eax, [ebp - 0x14c]
push eax
mov dword [ebp - 0x14c], 0xff67697f
call sub.msvcrt.dll__CxxThrowException
mov edx, dword [ebp - 0x138]
mov al, byte [eax + edx]
mov dword [ebp - 0x130], ecx
test al, al
jne 0x4a2121
lea ecx, [ebp - 0x13c]
call fcn.0049a530
cmp al, 0x5a
je 0x4a261a
mov edx, dword [ebp - 0x138]
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp edx, ecx
je 0x4a2141
cmp byte [ebp - 0x28], 0
jne 0x4a2141
push edx
call fcn.0040107c
add esp, 4
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
mov eax, 4
push edx
lea ecx, [ebp - 0x128]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x128], 0x2000205
mov dword [ebp - 0x130], eax
call fcn.004a07b0
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
jne 0x4a1ff4
xor ebx, ebx
cmp esi, ebx
je 0x4a21b9
mov eax, dword [ebp - 0x138]
lea edx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp eax, edx
je 0x4a205f
cmp byte [ebp - 0x28], bl
jmp 0x4a2054
mov eax, 2
cmp dword [ebp - 0x134], eax
jae 0x4a21da
cmp dword [ebp - 0x12c], eax
jae 0x4a21da
push eax
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov eax, dword [ebp - 0x138]
mov ecx, 2
push 0xa
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x130], ebx
call fcn.004a0c20
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
je 0x4a2243
mov eax, dword [ebp - 0x138]
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp eax, ecx
je 0x4a262c
cmp byte [ebp - 0x28], bl
jne 0x4a262c
push eax
call fcn.0040107c
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
cmp esi, ebx
jne 0x4a2196
mov eax, dword [ebp - 0x130]
mov edx, dword [ebp - 0x134]
inc eax
cmp eax, edx
jbe 0x4a2277
push 0x637c4c
lea eax, [ebp - 0x144]
push eax
mov dword [ebp - 0x144], 0xff67697f
call sub.msvcrt.dll__CxxThrowException
lea ecx, [eax + 1]
mov dword [ebp - 0x130], eax
cmp ecx, edx
jbe 0x4a229f
push 0x637c4c
lea ecx, [ebp - 0x140]
push ecx
mov dword [ebp - 0x140], 0xff67697f
call sub.msvcrt.dll__CxxThrowException
mov edx, dword [ebp - 0x138]
mov al, byte [eax + edx]
mov dword [ebp - 0x130], ecx
cmp al, 0xff
jne 0x4a22ef
lea eax, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
cmp edx, eax
je 0x4a2141
cmp byte [ebp - 0x28], bl
jne 0x4a2141
push edx
call fcn.0040107c
add esp, 4
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
cmp al, 2
jne 0x4a23e9
push 1
lea ecx, [ebp - 0x13c]
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], ebx
call fcn.004a17d0
lea ecx, [edi + 0xf]
push ecx
lea ecx, [ebp - 0x13c]
call fcn.004a1b00
lea edx, [edi + 0x4f]
push edx
lea ecx, [ebp - 0x13c]
call fcn.004a1b00
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x134]
call fcn.004a07b0
mov cl, byte [edi]
add esp, 4
mov esi, eax
test cl, cl
jne 0x4a261a
cmp esi, ebx
jne 0x4a25c6
mov eax, 2
cmp dword [ebp - 0x134], eax
jae 0x4a237b
cmp dword [ebp - 0x12c], eax
jae 0x4a237b
push eax
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov eax, dword [ebp - 0x138]
mov ecx, 2
push 0xa
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x130], ebx
call fcn.004a0c20
mov dl, byte [edi]
add esp, 4
mov esi, eax
test dl, dl
jne 0x4a261a
lea ecx, [ebp - 0x13c]
cmp esi, ebx
je 0x4a23d1
mov dword [ebp - 4], 0xffffffff
call fcn.0044a9d0
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.0049a530
lea ecx, [ebp - 0x13c]
call fcn.0049a530
test al, al
jne case.0x4a24f1.1
push 5
lea ecx, [ebp - 0x13c]
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], ebx
call fcn.004a17d0
push 1
lea ecx, [ebp - 0x13c]
call fcn.004a17d0
push ebx
lea ecx, [ebp - 0x13c]
call fcn.004a17d0
push 1
lea ecx, [ebp - 0x13c]
call fcn.004a17d0
mov eax, dword [0x6f1eec]
push eax
lea ecx, [ebp - 0x13c]
call fcn.004a1c10
movzx ecx, word [0x6f1ee8]
push ecx
lea ecx, [ebp - 0x13c]
call fcn.004a1bc0
mov edx, dword [edi + 4]
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x138]
push edx
call fcn.004a07b0
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
jne 0x4a261a
cmp esi, ebx
jne 0x4a25c6
mov eax, 4
cmp dword [ebp - 0x134], eax
jae 0x4a2499
cmp dword [ebp - 0x12c], eax
jae 0x4a2499
push eax
lea ecx, [ebp - 0x13c]
call fcn.00401b40
mov eax, dword [ebp - 0x138]
mov ecx, 4
push 0xa
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x130], ebx
call fcn.004a0c20
mov cl, byte [edi]
add esp, 4
mov esi, eax
test cl, cl
jne 0x4a261a
lea ecx, [ebp - 0x13c]
cmp esi, ebx
jne 0x4a23b2
call fcn.0049a530
lea ecx, [ebp - 0x13c]
call fcn.0049a530
test al, al
je 0x4a2520
movzx eax, al
dec eax
cmp eax, 7
ja case.0x4a24f1.1
jmp dword [eax*4 + 0x4a2640]
lea ecx, [ebp - 0x13c]
mov dword [ebp - 4], 0xffffffff
call fcn.0044a9d0
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x13c]
call fcn.0049a530
lea ecx, [ebp - 0x13c]
call fcn.0049a530
movzx eax, al
dec eax
je 0x4a25eb
sub eax, 2
je 0x4a2550
dec eax
jne 0x4a261a
push 0x12
jmp 0x4a2599
push 1
lea ecx, [ebp - 0x13c]
call fcn.00401c80
mov ecx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x138]
push 0xa
call fcn.004a0c20
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
jne 0x4a261a
lea ecx, [ebp - 0x13c]
cmp esi, ebx
jne 0x4a23b2
call fcn.0049a530
movzx ecx, al
add ecx, 2
push ecx
lea ecx, [ebp - 0x13c]
call fcn.00401c80
mov ecx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x138]
push 0xa
call fcn.004a0c20
mov dl, byte [edi]
add esp, 4
mov esi, eax
test dl, dl
jne 0x4a261a
cmp esi, ebx
je 0x4a261a
lea ecx, [ebp - 0x13c]
mov dword [ebp - 4], 0xffffffff
call fcn.0044a9d0
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 6
lea ecx, [ebp - 0x13c]
call fcn.00401c80
mov ecx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x138]
push 0xa
call fcn.004a0c20
mov esi, eax
mov al, byte [edi]
add esp, 4
test al, al
jne 0x4a261a
cmp esi, ebx
jne 0x4a25c6
lea ecx, [ebp - 0x13c]
mov dword [ebp - 4], 0xffffffff
call fcn.0044a9d0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret