Function at 0x10054e70
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov ecx, dword [ebp + 0x1c]
and dword [esp + 0x1c], 0
push ebx
push esi
push edi
push ecx
lea eax, [esp + 0x30]
push eax
push dword [ebp + 0x10]
push dword [ebp + 8]
call sym.php5.dll_php_network_getaddresses
add esp, 0x10
test eax, eax
je 0x10054f94
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x103abf94
mov edi, dword [eax]
mov esi, dword [eax + 4]
lea eax, [esp + 0x20]
push 0
push eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], esi
call sym.php5.dll_gettimeofday
mov ebx, dword [esp + 0x28]
add ebx, edi
mov edi, dword [esp + 0x2c]
add edi, esi
pop ecx
pop ecx
cmp edi, 0xf4240
jge 0x103abf88
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], eax
mov esi, dword [eax]
mov dword [esp + 0x10], esi
test esi, esi
je 0x10054f99
movzx eax, word [esi]
push 0
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov dword [esp + 0xc], ecx
cmp ecx, 0xffffffff
je 0x103ac143
movzx ecx, word [esi]
push 2
pop eax
sub ecx, eax
jne 0x103abfa1
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x18], 0x10
cmp dword [ebp + 0x24], 0
mov word [esi + 2], ax
jne 0x103abfda
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x10054f4f
cmp dword [eax], 0
jne 0x103ac0cc
mov ecx, eax
push dword [ebp + 0x20]
xor edx, edx
cmp dword [ebp + 0x18], edx
push ecx
lea eax, [esp + 0x38]
cmove eax, edx
push eax
push dword [ebp + 0x14]
push dword [esp + 0x28]
push esi
push dword [esp + 0x24]
call sym.php5.dll_php_network_connect_socket
add esp, 0x1c
cmp eax, 0xffffffff
je 0x103ac0df
push dword [esp + 0x2c]
call sym.php5.dll_php_network_freeaddresses
mov eax, dword [esp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
jmp 0x10054f8d
or dword [esp + 0xc], 0xffffffff
jmp 0x10054f7f
sub edi, 0xf4240
inc ebx
jmp 0x10054ede
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
jmp 0x10054ede
sub ecx, 0x15
jne 0x103ac139
cmp dword [ebp + 0x24], ecx
je 0x103abfc4
push 0x3a
push dword [ebp + 0x24]
call dword [sym.imp.MSVCR110.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x103ac139
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x18], 0x1c
jmp 0x10054f31
push 2
pop eax
cmp word [esi], ax
jne 0x103ac03f
push 0x10
call sym.php5.dll__emalloc
mov esi, eax
mov eax, dword [esp + 0x14]
pop ecx
mov cx, word [eax]
push dword [ebp + 0x28]
mov dword [esp + 0x18], 0x10
mov word [esi], cx
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esi + 4]
push ecx
push dword [ebp + 0x24]
mov word [esi + 2], ax
call sym.php5.dll_inet_aton
pop ecx
pop ecx
test eax, eax
je 0x103ac027
and dword [esi + 8], 0
and dword [esi + 0xc], 0
jmp 0x103ac07c
push dword [ebp + 0x24]
push str.Invalid_IP_Address:__s
push 2
pop eax
push eax
push 0
call sym.php5.dll_php_error_docref0
add esp, 0x10
jmp 0x103ac0bc
push 0x1c
call sym.php5.dll__emalloc
mov esi, eax
mov eax, dword [esp + 0x14]
pop ecx
mov ax, word [eax]
push dword [ebp + 0x28]
mov dword [esp + 0x18], 0x1c
mov word [esi], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
lea eax, [esi + 8]
push eax
push dword [ebp + 0x24]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x103ac027
push dword [esp + 0x14]
push esi
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x103ac0bc
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCR110.dll_strerror]
pop ecx
push eax
mov eax, dword [ebp + 0x28]
movzx eax, ax
push eax
push dword [ebp + 0x24]
push str.failed_to_bind_to__s:_d__system_said:__s
push 2
pop eax
push eax
push 0
call sym.php5.dll_php_error_docref0
add esp, 0x18
push esi
call sym.php5.dll__efree
mov esi, dword [esp + 0x14]
pop ecx
jmp 0x10054f3f
push dword [eax]
call sym.php5.dll__efree
pop ecx
mov ecx, dword [ebp + 0x1c]
and dword [ecx], 0
jmp 0x10054f51
cmp dword [ebp + 0x18], 0
je 0x103ac139
lea eax, [esp + 0x38]
push 0
push eax
call sym.php5.dll_gettimeofday
pop ecx
pop ecx
cmp dword [esp + 0x38], ebx
jge 0x103ac131
mov eax, edi
sub eax, dword [esp + 0x3c]
mov ecx, ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x34], eax
jns 0x103ac117
add eax, 0xf4240
lea ecx, [ebx - 1]
mov dword [esp + 0x34], eax
sub ecx, dword [esp + 0x38]
mov dword [esp + 0x30], ecx
jns 0x103ac139
inc ecx
sub eax, 0xf4240
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
jmp 0x103ac139
mov dword [esp + 0x28], 1
push dword [esp + 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x20]
add eax, 4
cmp dword [esp + 0x28], 0
mov dword [esp + 0x20], eax
je 0x10054ee6
jmp 0x10054f99