Function at 0x5386e0
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x138
mov eax, dword [0x6d5ec0]
xor eax, esp
mov dword [esp + 0x134], eax
push ebx
push ebp
mov ebp, dword [esp + 0x144]
mov dword [esp + 0x18], ebp
push esi
mov esi, dword [esp + 0x14c]
push edi
test ebp, ebp
je 0x538aae
mov bl, byte [ebp]
test bl, bl
je 0x538aae
test esi, esi
je 0x538aae
cmp byte [esi], 0
je 0x538aae
mov dword [esp + 0x14], 0
mov ecx, esi
mov eax, 0x6a4e0c
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x538760
test dl, dl
je 0x53875c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x538760
add eax, 2
add ecx, 2
test dl, dl
jne 0x538740
xor eax, eax
jmp 0x538765
sbb eax, eax
or eax, 1
test eax, eax
je 0x538aaa
cmp bl, 0x5b
jne 0x5387c9
push 0x5d
push ebp
call fcn.00620ca0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x538aae
inc ebp
sub ebx, ebp
mov dword [esp + 0x1c], ebx
cmp ebx, 0x80
jae 0x538aae
push ebx
lea eax, [esp + 0xc8]
push ebp
push eax
call fcn.00620e40
lea ebp, [esp + 0xd0]
mov byte [esp + ebx + 0xd0], 0
add esp, 0xc
mov dword [esp + 0x20], ebp
mov dword [esp + 0x14], 2
jmp 0x538802
mov ebx, ebp
lea ecx, [ebx + 1]
nop
mov al, byte [ebx]
inc ebx
test al, al
jne 0x5387d0
lea eax, [esp + 0x10]
sub ebx, ecx
push eax
push ebp
push 2
mov dword [esp + 0x28], ebx
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x5387f6
mov dword [esp + 0x14], eax
jmp 0x538802
cmp byte [ebx + ebp - 1], 0x2e
jne 0x538802
dec ebx
mov dword [esp + 0x1c], ebx
cmp byte [esi], 0
je 0x538aae
mov al, byte [esi]
xor edi, edi
mov cl, al
cmp cl, 0x20
je 0x53881a
cmp al, 9
jne 0x538824
mov al, byte [esi + 1]
inc esi
mov cl, al
test al, al
jne 0x538811
mov cl, byte [esi]
mov edx, esi
test cl, cl
je 0x538a80
mov al, cl
cmp cl, 0x20
je 0x53884a
cmp al, 9
je 0x53884a
cmp al, 0x2c
je 0x53884a
mov al, byte [esi + 1]
inc esi
inc edi
mov cl, al
test al, al
jne 0x538832
test edi, edi
je 0x538a80
mov eax, dword [esp + 0x14]
sub eax, 0
je 0x538a2a
sub eax, 1
je 0x53886d
sub eax, 1
jne 0x538a80
xor ebx, ebx
cmp edi, 0x80
jae 0x538a80
push edi
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00620e40
lea eax, [esp + 0x50]
mov byte [esp + edi + 0x50], bl
push 0x2f
push eax
call fcn.00620ca0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x5388b1
lea ecx, [edi + 1]
push ecx
call fcn.0063ebd7
add esp, 4
mov byte [edi], 0
mov ebx, eax
cmp dword [esp + 0x14], 2
jne 0x5389a2
test ebx, ebx
jne 0x5388c5
lea ebp, [ebx + 0x10]
jmp 0x5388e0
mov ebp, ebx
and ebx, 7
shr ebp, 3
cmp ebp, 0x10
ja 0x538a74
jne 0x5388e0
test ebx, ebx
jne 0x538a74
mov edi, dword [sym.imp.WS2_32.dll_inet_pton]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x24]
push 0x17
call edi
cmp eax, 1
jne 0x538a74
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x48]
push eax
push 0x17
call edi
cmp eax, 1
jne 0x538a74
test ebp, ebp
je 0x538979
mov edi, ebp
lea ecx, [esp + 0x34]
lea edx, [esp + 0x24]
sub edi, 4
jb 0x538937
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x53893c
add ecx, 4
add edx, 4
sub edi, 4
jae 0x538926
cmp edi, 0xfffffffc
je 0x538979
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x538a74
cmp edi, 0xfffffffd
je 0x538979
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x538a74
cmp edi, 0xfffffffe
je 0x538979
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x538a74
cmp edi, 0xffffffff
je 0x538979
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x538a74
test ebx, ebx
je 0x538a70
movzx eax, byte [esp + ebp + 0x34]
mov ecx, 8
movzx edx, byte [esp + ebp + 0x24]
sub ecx, ebx
xor edx, eax
mov eax, 0xff
shl eax, cl
test eax, edx
jmp 0x538a6e
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0
cmp ebx, 0x20
ja 0x538a74
lea eax, [esp + 0x18]
push eax
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_inet_pton]
push 2
call ebp
cmp eax, 1
jne 0x538a74
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x48]
push eax
push 2
call ebp
cmp eax, 1
jne 0x538a74
test ebx, ebx
je 0x538a1d
cmp ebx, 0x20
je 0x538a1d
push dword [esp + 0x18]
mov ebp, dword [sym.imp.WS2_32.dll_htonl]
call ebp
push dword [esp + 0x10]
mov edi, eax
call ebp
mov ecx, 0x20
or edx, 0xffffffff
sub ecx, ebx
xor eax, edi
shl edx, cl
test edx, eax
sete al
jmp 0x538a76
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
sete al
jmp 0x538a76
cmp byte [edx + edi - 1], 0x2e
jne 0x538a36
sub edi, 1
je 0x538a3d
cmp byte [edx], 0x2e
jne 0x538a3d
inc edx
dec edi
cmp edi, ebx
jne 0x538a53
push ebx
push ebp
push edx
call fcn.0050eb00
add esp, 0xc
test eax, eax
setne al
jmp 0x538a76
jae 0x538a80
mov eax, ebp
sub eax, edi
add eax, ebx
cmp byte [eax - 1], 0x2e
jne 0x538a74
push edi
push eax
push edx
call fcn.0050eb00
add esp, 0xc
test eax, eax
je 0x538a74
mov al, 1
jmp 0x538a76
xor al, al
test al, al
jne 0x538aaa
nop word [eax + eax]
mov al, byte [esi]
cmp al, 0x20
je 0x538a8a
cmp al, 9
jne 0x538a8d
inc esi
jmp 0x538a80
cmp al, 0x2c
jne 0x538aae
mov al, byte [esi + 1]
inc esi
cmp al, 0x2c
je 0x538a91
test al, al
je 0x538aae
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
jmp 0x53880b
mov al, 1
jmp 0x538ab0
xor al, al
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0061eb08
add esp, 0x138
ret