Function at 0x402560
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x54
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x40cfd0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push 0x80
call fcn.0041931b
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
push 0x10
call fcn.0040d42e
add esp, 4
mov esi, eax
mov dword [eax + 4], 1
mov dword [eax + 8], 1
mov dword [eax], vtable.std::_Ref_count_resource_char___class__private:_void___thiscall_VciToolServer::Get_local_broadcast_address_void_::_1::_lambda_0__.0
mov edi, dword [ebp - 0x20]
mov dword [eax + 0xc], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], eax
push 0x80
push edi
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x402609
lock dec dword [esi + 4]
jne 0x4029cc
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock dec dword [esi + 8]
jne 0x4029cc
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x4029cc
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x4025e3
mov ecx, dword [ebp - 0x44]
mov esi, dword [ecx + 0x18]
mov edi, dword [ecx + 0x1c]
cmp esi, edi
jne 0x402659
jmp 0x402689
add eax, 0x24
mov ebx, eax
mov ecx, edx
push ebx
push ecx
call fcn.0040d463
add esp, 8
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
add esi, 0x18
cmp esi, edi
je 0x402680
mov eax, dword [esi + 0x14]
cmp eax, 0x10
jb 0x402641
mov ecx, dword [esi]
lea ebx, [eax + 1]
cmp ebx, 0x1000
jb 0x402637
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jb 0x402630
call fcn.00417d58
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx + 0x18]
mov dword [ecx + 0x1c], eax
lea eax, [ecx + 0x18]
mov dword [ebp - 0x50], eax
xor edi, edi
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
mov esi, dword [ebp - 0x48]
jmp 0x4026e1
mov eax, dword [ebp - 0x44]
cmp edi, dword [eax + 0x20]
je 0x4027ad
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
movups xmm0, xmmword [ebp - 0x40]
movups xmmword [edi], xmm0
movsd xmm0, qword [ebp - 0x30]
movsd qword [edi + 0x10], xmm0
add dword [eax + 0x1c], 0x18
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x4c]
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
nop dword [eax]
inc edi
mov eax, dword [esi + 0xc]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x4029c1
mov eax, dword [eax]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
push eax
call ebx
test eax, eax
je 0x4026e0
push str.169.254.
push eax
mov dword [ebp - 0x20], eax
call fcn.00411f00
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x20]
jne 0x4026e0
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
push eax
call fcn.004194c0
add esp, 4
test eax, eax
js 0x4029dd
mov esi, eax
cmp eax, 0xf
lea ebx, [ebp - 0x40]
mov dword [ebp - 0x4c], edi
ja 0x40276a
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], 0xf
push esi
push dword [ebp - 0x20]
push ebx
call fcn.004116f0
add esp, 0xc
add esi, ebp
add esi, 0xffffffc0
jmp 0x402800
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x28], esi
or esi, 0xf
cmp esi, 0x17
mov eax, 0x16
cmovb esi, eax
mov dword [ebp - 0x10], 1
cmp esi, 0xfff
mov dword [ebp - 0x54], esi
jb 0x4027cf
lea eax, [esi + 0x24]
push eax
call fcn.0040d42e
add esp, 4
mov esi, eax
add esi, 0x23
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x4027dd
mov dword [ebp - 0x10], 2
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x40]
push eax
push edi
call fcn.00406620
mov eax, dword [ebp - 0x2c]
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
jmp 0x402976
lea eax, [esi + 1]
push eax
call fcn.0040d42e
add esp, 4
mov esi, eax
lea ebx, [ebp - 0x40]
mov dword [ebp - 0x40], esi
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x30], edi
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x2c], eax
push edi
push dword [ebp - 0x20]
push esi
call fcn.004116f0
add esp, 0xc
add edi, esi
mov esi, edi
mov byte [esi], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov esi, ebx
cmp ecx, 0x10
jb 0x402813
mov esi, dword [ebp - 0x40]
test eax, eax
je 0x40284c
cmp byte [eax + esi - 1], 0x2e
mov edx, eax
jne 0x402830
lea edi, [eax + esi]
dec edi
jmp 0x402844
cmp edx, 1
je 0x40289f
lea edi, [edx - 1]
cmp byte [esi + edx - 2], 0x2e
mov edx, edi
jne 0x402830
add edi, esi
dec edi
sub edi, esi
cmp eax, edi
jb 0x402851
jmp 0x4028a8
mov edi, 0xffffffff
mov edx, edi
sub edx, eax
sub ecx, eax
cmp ecx, edx
jae 0x402885
mov dword [ebp - 0x10], 2
sub esp, 0x10
movzx eax, byte [ebp - 0x24]
mov byte [esp + 4], al
mov dword [esp + 8], edx
mov dword [esp], edx
mov dword [esp + 0xc], 0
mov ecx, ebx
call fcn.004064d0
jmp 0x40289a
mov dword [ebp - 0x30], edi
add eax, esi
push edx
push 0
push eax
call fcn.00411c70
add esp, 0xc
mov byte [esi + edi], 0
lea ebx, [ebp - 0x40]
jmp 0x4028af
mov edi, 0xffffffff
cmp eax, edi
jb 0x402851
mov dword [ebp - 0x30], edi
mov byte [esi + edi], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov edx, ecx
sub edx, eax
cmp edx, 4
jae 0x4028f0
mov dword [ebp - 0x10], 2
sub esp, 0x10
movzx eax, byte [ebp - 0x24]
mov byte [esp + 4], al
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x42f26b
mov dword [esp], 4
mov ecx, ebx
call fcn.00401e80
jmp 0x40290a
lea edx, [eax + 4]
mov dword [ebp - 0x30], edx
cmp ecx, 0x10
jb 0x4028fe
mov ebx, dword [ebp - 0x40]
mov dword [ebx + eax], 0x3535322e
mov byte [ebx + eax + 4], 0
mov eax, dword [ebp - 0x44]
mov ebx, dword [eax + 0x18]
mov edi, dword [eax + 0x1c]
cmp ebx, edi
je 0x40269c
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ecx
cmp ecx, 0x10
jb 0x402932
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x30]
jmp 0x40295c
push esi
push dword [ebp - 0x20]
push eax
call fcn.0041006d
add esp, 0xc
test eax, eax
je 0x40296d
add ebx, 0x18
cmp ebx, edi
je 0x40269c
cmp dword [ebx + 0x10], esi
jne 0x402951
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x402940
mov eax, dword [ebx]
jmp 0x402940
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
mov eax, dword [ebp - 0x28]
cmp eax, 0x10
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x4c]
jb 0x4026e0
mov ecx, eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
lea edx, [ecx + 1]
cmp edx, 0x1000
jb 0x4029b1
mov ecx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, ecx
cmp eax, 0x20
jae 0x40267b
mov edx, dword [ebp - 0x28]
add edx, 0x24
mov eax, ecx
push edx
push eax
call fcn.0040d463
add esp, 8
inc edi
jmp 0x4026e1
mov esi, dword [ebp - 0x5c]
test esi, esi
jne 0x4025e3
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], 1
call fcn.00401b80
nop dword [eax]
push ebp
sub esp, 0x10
add ebp, 0xc
push dword [ebp - 0x20]
call fcn.00419300
add esp, 0x14
pop ebp
ret