Function at 0x4cf220
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x65c
mov eax, dword [0x401424]
xor eax, esp
mov dword [esp + 0x658], eax
push ebx
push ebp
mov ebp, dword [esp + 0x66c]
push esi
mov esi, dword [esp + 0x66c]
push edi
push 0x2e
push 0
mov eax, dword [esi + 0x18]
mov dword [esp + 0x30], eax
add eax, 0x3f0
mov dword [esp + 0x34], eax
lea eax, [esp + 0xc5]
push eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x24], 0x1e
mov dword [esp + 0x30], 0xffffffff
mov byte [esp + 0xc8], 0
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [esi + 0x55c]
add esp, 0xc
xor edi, edi
mov dword [esp + 0x34], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x30], 0
test ebx, ebx
je 0x4cf48c
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cf2c0
sub ecx, edx
cmp ecx, 1
jbe 0x4cf48c
mov al, byte [ebx]
cmp al, 0x5b
jne 0x4cf2fe
lea eax, [ebx + 1]
push 0x5d
push eax
mov dword [esp + 0x1c], eax
call sub.VCRUNTIME140.dll_strchr
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4cf33a
mov eax, dword [esp + 0x14]
mov edi, ebx
sub edi, eax
mov dword [esp + 0x30], eax
jmp 0x4cf340
cmp al, 0x3a
je 0x4cf340
push 0x3a
push ebx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], ebx
test eax, eax
je 0x4cf39b
mov edi, eax
lea eax, [esp + 0x44]
push eax
push ebx
push 0x17
sub edi, ebx
call dword [sym.imp.WS2_32.dll_inet_pton]
lea ebx, [eax - 1]
neg ebx
sbb ebx, ebx
and ebx, dword [esp + 0x14]
xor edx, edx
test ebx, ebx
je 0x4cf3af
push 0x3a
push ebx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [esp + 0x14], eax
xor ebx, ebx
xor edx, edx
test eax, eax
je 0x4cf3b1
push 0xa
push edx
inc eax
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
push eax
call fcn.004aeb30
push 0x2d
push dword [esp + 0x28]
movzx ebx, ax
call sub.VCRUNTIME140.dll_strchr
add esp, 0x18
test eax, eax
je 0x4cf397
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
push eax
call fcn.004aeb30
add esp, 0x10
movzx edx, ax
jmp 0x4cf3b1
mov edx, ebx
jmp 0x4cf3b1
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4cf3a0
sub edi, ecx
xor ebx, ebx
xor edx, edx
jmp 0x4cf3b1
xor ebx, ebx
xor ecx, ecx
movzx eax, dx
cmp bx, dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp bx, dx
mov dword [esp + 0x1c], eax
movzx eax, bx
cmovbe ecx, eax
movzx ebx, cx
test edi, edi
je 0x4cf47b
cmp edi, 0x32
jae 0x4cfaa7
push edi
push dword [esp + 0x34]
lea eax, [esp + 0xf4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [esp + edi + 0xec], 0
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x264]
push 0x401
push eax
lea eax, [esp + 0xf4]
push eax
mov eax, dword [edi + 0x24]
push dword [edi + 0x4c8]
add eax, 0x10
push eax
call fcn.004eb1f0
add esp, 4
push eax
mov eax, dword [edi + 0x24]
push dword [eax]
call fcn.004a1380
add esp, 0x18
sub eax, 0
je 0x4cf457
sub eax, 1
je 0x4cfaa7
sub eax, 1
jne 0x4cf460
lea edi, [esp + 0x264]
jmp 0x4cf462
lea edi, [esp + 0xec]
jmp 0x4cf462
xor edi, edi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
movzx ebx, ax
mov dword [esp + 0x1c], ebx
test edi, edi
jne 0x4cf528
jmp 0x4cf48c
mov eax, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
movzx eax, ax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x80
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x30]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4cf4df
push 0x100
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00493ac0
push eax
push 0x40ac04
push esi
call fcn.004ab2d0
add esp, 0x18
jmp 0x4cfaa7
mov ax, word [esp + 0x3c]
cmp ax, 0x17
je 0x4cf4f3
lea ecx, [esp + 0x40]
movzx eax, ax
jmp 0x4cf4fc
lea ecx, [esp + 0x44]
mov eax, 0x17
push 0x401
lea edx, [esp + 0x268]
movzx eax, ax
push edx
push ecx
push eax
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x4cfaa7
xor al, al
lea edi, [esp + 0x264]
mov byte [esp + 0x13], al
lea eax, [esp + 0x34]
push eax
push 0
push 0
push edi
push esi
call fcn.004b3f60
add esp, 0x14
cmp eax, 1
jne 0x4cf54e
lea eax, [esp + 0x34]
push eax
push esi
call fcn.004a15c0
add esp, 8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4cfa98
mov ebx, dword [eax]
push eax
push esi
call fcn.004b4510
add esp, 8
test ebx, ebx
je 0x4cfa98
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x2c]
movzx eax, byte [eax + 0x4d2]
push eax
push 0
push ebx
push esi
call fcn.004da170
add esp, 0x14
test eax, eax
je 0x4cf5c5
call edi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x4cf574
push 0x100
lea ecx, [esp + 0x168]
push ecx
push eax
call fcn.00493ac0
push eax
push 0x40ac54
push esi
call fcn.004ab2d0
add esp, 0x18
jmp 0x4cfaa7
cmp byte [esi + 0x68a], 0
je 0x4cf612
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cf5de
cmp dword [eax + 4], 1
jl 0x4cf612
cmp dword [0x4010e0], 1
jl 0x4cf612
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4cf5fe
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x40a6f0]
jmp 0x4cf603
mov eax, 0x40a968
push eax
push 0x40ac68
push esi
call fcn.004ab510
add esp, 0xc
push dword [ebx + 0x10]
lea eax, [esp + 0x40]
push dword [ebx + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
movzx edi, ax
cmp ax, word [esp + 0x1c]
ja 0x4cfa88
mov eax, dword [sym.imp.WS2_32.dll_htons]
push edi
call eax
push dword [esp + 0x20]
movzx eax, ax
mov word [esp + 0x42], ax
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4cf747
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x4cf701
cmp eax, 0x2741
jne 0x4cf701
cmp byte [esi + 0x68a], 0
je 0x4cf6c5
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cf69b
cmp dword [eax + 4], 1
jl 0x4cf6c5
push 0x100
lea eax, [esp + 0x168]
push eax
push 0x2741
call fcn.00493ac0
push eax
movzx eax, di
push eax
push 0x40ac94
push esi
call fcn.004ab3a0
add esp, 0x1c
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x80
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x30]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4cf4b2
mov eax, dword [esp + 0x14]
movzx edi, ax
xor al, al
mov byte [esp + 0x13], al
jmp 0x4cf63e
cmp eax, 0x2740
je 0x4cf70d
cmp eax, 0xd
jne 0x4cf71c
inc edi
mov byte [esp + 0x13], cl
movzx eax, di
mov edi, eax
jmp 0x4cf633
push 0x100
lea ecx, [esp + 0x168]
push ecx
push eax
call fcn.00493ac0
push eax
movzx eax, di
push eax
push 0x40acc4
push esi
call fcn.004ab2d0
add esp, 0x1c
jmp 0x4cfaa7
cmp di, word [esp + 0x1c]
ja 0x4cfa88
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x80
push eax
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4cf4b2
cmp byte [esi + 0x68a], al
je 0x4cf7c6
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cf78e
cmp dword [eax + 4], 1
jl 0x4cf7c6
cmp dword [0x4010e0], 1
jl 0x4cf7c6
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4cf7ae
movzx eax, byte [eax + 0x49e]
mov ecx, dword [eax*4 + 0x40a6f0]
jmp 0x4cf7b3
mov ecx, 0x40a968
movzx eax, di
push eax
push ecx
push 0x40ad04
push esi
call fcn.004ab510
add esp, 0x10
push 1
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4cf803
push 0x100
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00493ac0
push eax
push 0x40ac54
push esi
call fcn.004ab2d0
add esp, 0x18
jmp 0x4cfaa7
cmp byte [esi + 0x68a], 0
je 0x4cf854
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cf81c
cmp dword [eax + 4], 1
jl 0x4cf854
cmp dword [0x4010e0], 1
jl 0x4cf854
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4cf83c
movzx eax, byte [eax + 0x49e]
mov ecx, dword [eax*4 + 0x40a6f0]
jmp 0x4cf841
mov ecx, 0x40a968
movzx eax, di
push eax
push ecx
push 0x40ad38
push esi
call fcn.004ab510
add esp, 0x10
push 0x2f
lea eax, [esp + 0xc0]
push eax
push ebx
call fcn.004b3f10
mov ebx, dword [esp + 0x34]
add esp, 0xc
cmp byte [ebx + 0x251], 0
jne 0x4cf884
cmp byte [ebx + 0x24c], 0
je 0x4cf884
mov byte [ebx + 0x251], 1
lea eax, [esp + 0x24]
push eax
push 1
push ebx
push esi
call fcn.004d9ee0
mov edx, eax
add esp, 0x10
mov dword [esp + 0x18], edx
test edx, edx
jne 0x4cfaa7
mov dword [esp + 0x24], 0xffffffff
cmp ebp, 2
je 0x4cf90e
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x3c]
nop dword [eax + eax]
cmp byte [ebx + 0x251], 0
jne 0x4cf8cd
test ebp, ebp
je 0x4cf904
cmp ebp, 1
jne 0x4cf8d8
cmp cx, 2
jne 0x4cf904
movzx eax, cx
sub eax, 2
je 0x4cf8e5
sub eax, 0x15
jne 0x4cf904
push dword [esp + 0x3e]
call edi
movzx ebx, ax
test ebp, ebp
je 0x4cfa04
cmp ebp, 1
je 0x4cf973
mov cx, word [esp + 0x3c]
mov ebx, dword [esp + 0x28]
inc ebp
cmp ebp, 2
jne 0x4cf8c0
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov dword [edi + 0xa0], ebp
mov edi, dword [esi + 0x18]
mov dword [esp + 0x18], edx
mov cl, byte [edi + 0x49e]
cmp cl, 0x1c
je 0x4cfa77
cmp byte [esi + 0x68a], 0
je 0x4cfa77
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cf94f
cmp dword [eax + 4], 1
jl 0x4cfa77
cmp dword [0x4010e0], 1
jl 0x4cfa77
test edi, edi
je 0x4cfa5a
movzx eax, cl
mov eax, dword [eax*4 + 0x40a6f0]
jmp 0x4cfa5f
lea edx, [esp + 0x120]
mov esi, 0x2c
lea edi, [esp + 0xbc]
mov cl, byte [edi]
test cl, cl
je 0x4cf99d
cmp cl, 0x2e
movzx eax, cl
cmove eax, esi
mov byte [edx], al
inc edx
add edi, 1
jne 0x4cf986
movzx ecx, bx
movzx eax, cl
push eax
shr ecx, 8
push ecx
push 0x40ad98
push 0x14
push edx
mov byte [edx], 0
call fcn.004999e0
mov edi, dword [esp + 0x40]
lea eax, [esp + 0x134]
mov esi, dword [esp + 0x4c]
push eax
push 0x40a781
push 0x40a230
push edi
push esi
call fcn.004e9c40
mov edx, eax
add esp, 0x28
mov dword [esp + 0x18], edx
test edx, edx
je 0x4cf912
push edx
call fcn.00493c30
push eax
push 0x40ada0
push esi
call fcn.004ab2d0
add esp, 0x10
jmp 0x4cfaa7
mov edi, dword [esp + 0x2c]
movzx eax, bx
push eax
lea eax, [esp + 0xc0]
push eax
xor eax, eax
cmp word [esp + 0x44], 2
setne al
inc eax
push eax
push 0x40a77c
push 0x40ad64
push edi
push esi
call fcn.004e9c40
mov edx, eax
add esp, 0x1c
mov dword [esp + 0x18], edx
test edx, edx
je 0x4cf912
push edx
call fcn.00493c30
push eax
push 0x40ad74
push esi
call fcn.004ab2d0
add esp, 0x10
jmp 0x4cfaa7
mov eax, 0x40a968
push 0x40a940
push eax
push 0x40a96c
push esi
call fcn.004ab510
mov edx, dword [esp + 0x28]
add esp, 0x10
mov byte [edi + 0x49e], 0x1c
test edx, edx
je 0x4cfb0a
jmp 0x4cfaa7
push 0x40ace0
push esi
call fcn.004ab2d0
add esp, 8
jmp 0x4cfaa7
push edi
push 0x40ac20
push esi
call fcn.004ab2d0
add esp, 0xc
mov edi, dword [esi + 0x18]
mov cl, byte [edi + 0x49e]
test cl, cl
je 0x4cfaff
cmp byte [esi + 0x68a], 0
je 0x4cfaff
mov eax, dword [esi + 0xca8]
test eax, eax
je 0x4cfacd
cmp dword [eax + 4], 1
jl 0x4cfaff
cmp dword [0x4010e0], 1
jl 0x4cfaff
test edi, edi
je 0x4cfae6
movzx eax, cl
mov eax, dword [eax*4 + 0x40a6f0]
jmp 0x4cfaeb
mov eax, 0x40a968
push 0x40a844
push eax
push 0x40a96c
push esi
call fcn.004ab510
add esp, 0x10
mov edx, dword [esp + 0x18]
mov byte [edi + 0x49e], 0
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x4cfb27
push eax
push dword [esp + 0x2c]
push esi
call fcn.004da140
mov eax, dword [esp + 0x24]
add esp, 0xc
jmp 0x4cfb29
mov eax, edx
mov ecx, dword [esp + 0x668]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ed9d4
add esp, 0x65c
ret