Function at 0x4af930
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x54
mov eax, dword [0x401424]
xor eax, esp
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x58]
push ebx
mov ebx, dword [esp + 0x60]
mov dword [esp + 4], 0
push edi
mov edi, dword [esp + 0x68]
test ebx, ebx
je 0x4afb79
test edi, edi
jne 0x4af967
mov eax, dword [ebx]
test eax, eax
cmovne edi, eax
test byte [ebx + 0x14], 4
jne 0x4afb79
test edi, edi
je 0x4afb79
cmp byte [edi], 0
je 0x4afb79
push ebp
push esi
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
push ecx
call fcn.004bd600
add esp, 0x10
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4afb41
push dword [esp + 0x14]
push 0x4058c8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov ebx, dword [ebx + 4]
add esp, 8
test ebx, ebx
je 0x4afb04
mov dword [esp + 0x18], 0
nop dword [eax]
mov esi, dword [ebx]
mov ebp, 0x403744
mov eax, dword [esp + 0x14]
mov ebx, dword [ebx + 8]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x2c]
push eax
push dword [esi + 0x1c]
mov dword [esp + 0x24], ebp
push dword [esi + 0x18]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
call fcn.004bce50
add esp, 0xc
test eax, eax
jne 0x4afb66
lea eax, [esp + 0x50]
push eax
push dword [esi + 0xc]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x4afa2b
mov ebp, 0x404c8c
mov dword [esp + 0x1c], 0x404c88
lea eax, [esp + 0x50]
push eax
push dword [esi]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x4afa4f
mov dword [esp + 0x24], 0x404c8c
mov dword [esp + 0x20], 0x404c88
mov eax, dword [esi + 0x14]
cmp eax, 8
je 0x4afa75
cmp eax, 0x10
je 0x4afa6e
cmp eax, 0x20
mov edx, 0x403744
mov eax, 0x405850
cmove edx, eax
jmp 0x4afa7a
mov edx, 0x40584c
jmp 0x4afa7a
mov edx, 0x405848
mov eax, dword [esi + 8]
cmp eax, 8
je 0x4afaa0
cmp eax, 0x10
je 0x4afa99
cmp eax, 0x20
mov ecx, 0x403744
mov eax, 0x405850
cmove ecx, eax
jmp 0x4afaa5
mov ecx, 0x40584c
jmp 0x4afaa5
mov ecx, 0x405848
push dword [esi + 0x24]
movzx eax, byte [esi + 0x20]
push eax
push dword [esp + 0x34]
mov eax, dword [esp + 0x48]
push dword [esp + 0x3c]
inc eax
push dword [esp + 0x44]
push dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x5c]
add eax, 0x76c
push eax
movzx eax, word [esi + 0x10]
push eax
push dword [esp + 0x40]
movzx eax, word [esi + 4]
push dword [esi + 0xc]
push ebp
push edx
push eax
push dword [esp + 0x58]
push dword [esi]
push dword [esp + 0x64]
push ecx
push 0x405884
push dword [esp + 0x74]
call fcn.004999c0
add esp, 0x50
test ebx, ebx
jne 0x4af9d0
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x4afb45
push edi
push eax
call fcn.004bd520
add esp, 8
test eax, eax
je 0x4afb41
mov dword [esp + 0x18], 0x17
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4afb45
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call dword [fcn.00401038]
mov eax, dword [esp + 0x1c]
add esp, 4
pop esi
pop ebp
pop edi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ed9d4
add esp, 0x54
ret
push dword [esp + 0x14]
mov dword [esp + 0x1c], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
jmp 0x4afb2f
mov ecx, dword [esp + 0x58]
xor eax, eax
pop edi
pop ebx
xor ecx, esp
call fcn.004ed9d4
add esp, 0x54
ret