Function at 0x10040330
Capabilities:
Convert ip address from string

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004ae45
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x68
mov eax, dword [0x1007c040]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebx + 8]
mov ecx, edi
mov dword [ebp - 0x54], edi
cmp dword [edi + 0x14], 0xf
mov eax, dword [edi + 0x10]
jbe 0x10040388
mov ecx, dword [edi]
mov dword [ebp - 0x54], ecx
test eax, eax
je 0x100405ae
push eax
push 0x3a
push ecx
call sub.VCRUNTIME140.dll_memchr
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100405ae
sub esi, dword [ebp - 0x54]
cmp esi, 0xffffffff
je 0x100405ae
cmp dword [edi + 0x10], esi
mov ecx, esi
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0
cmovb ecx, dword [edi + 0x10]
mov eax, edi
cmp dword [edi + 0x14], 0xf
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x3c], 0
jbe 0x100403da
mov eax, dword [edi]
push ecx
push eax
lea ecx, [ebp - 0x50]
call fcn.10009180
mov dword [ebp - 4], 0
inc esi
mov eax, dword [edi + 0x10]
xorps xmm0, xmm0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
movups xmmword [ebp - 0x74], xmm0
cmp eax, esi
jb 0x100406af
sub eax, esi
or ecx, 0xffffffff
cmp eax, 0xffffffff
cmovb ecx, eax
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x10040421
mov eax, dword [edi]
push ecx
add eax, esi
lea ecx, [ebp - 0x74]
push eax
call fcn.10009180
mov byte [ebp - 4], 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [ebp - 0x60], 0xf
lea esi, [ebp - 0x74]
mov dword [ebp - 0x20], eax
cmova esi, dword [ebp - 0x74]
mov dword [eax], 0
lea eax, [ebp - 0x54]
push 0xa
push eax
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov dword [ebp - 0x5c], eax
cmp esi, dword [ebp - 0x54]
jne 0x1004046e
push str.invalid_stoi_argument
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const__]
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0x22
jne 0x10040481
push str.stoi_argument_out_of_range
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const__]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x60]
cmp ecx, 0xf
jbe 0x100404bb
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100404b1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100404b1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.10046175
add esp, 8
lea ecx, [ebp - 0x55]
mov byte [ebp - 4], 2
call fcn.1003d2e0
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.1003d4e0
mov byte [ebp - 4], 4
mov edx, str.Resolved_IP:
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.10008100
cmp dword [ebp - 0x24], 0xf
lea edx, [ebp - 0x38]
push dword [ebp - 0x28]
cmova edx, dword [ebp - 0x38]
mov ecx, eax
call fcn.1000a670
add esp, 4
mov ecx, eax
push 0x100085a0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [ebp - 0x24], 0xf
lea ecx, [ebp - 0x20]
lea eax, [ebp - 0x38]
cmova eax, dword [ebp - 0x38]
push ecx
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x100405cc
mov ecx, dword [ebp - 0x24]
cmp ecx, 0xf
jbe 0x10040566
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1004055c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004060f
push ecx
push edx
call fcn.10046175
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0xf
jbe 0x100405ae
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100405a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004060f
push ecx
push edx
call fcn.10046175
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.10046167
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_ntohl]
push edi
mov esi, eax
call fcn.10042380
mov edx, dword [ebp - 0x5c]
movzx ecx, dx
mov dword [eax], esi
mov word [eax + 4], cx
mov ecx, dword [ebp - 0x24]
cmp ecx, 0xf
jbe 0x1004061f
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10040615
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10040615
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.10046175
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x10040677
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0xf
jbe 0x100405ae
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100405a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100405a4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.100070b0
int3