Function at 0x40aadb
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
push 0x40
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [0x40d3d0], eax
pop ecx
test eax, eax
jne 0x40ab01
push 0x64
push 2
jmp 0x40ae9b
push 2
pop ebx
mov ecx, ebx
call fcn.0040aab7
push 0x17
pop esi
test eax, eax
jne 0x40ab22
mov ecx, esi
call fcn.0040aab7
mov edx, 0x403728
test eax, eax
jne 0x40ab27
mov edx, 0x40371c
mov ecx, dword [0x40d3d0]
call fcn.004067bf
test eax, eax
je 0x40ae95
mov eax, dword [0x40d3d0]
mov ecx, 0x3500
mov dword [0x40d3cc], 1
cmp word [eax], bx
jne 0x40ab5c
mov word [eax + 2], cx
mov eax, dword [0x40d3d0]
cmp word [eax], si
jne 0x40ab65
mov word [eax + 2], cx
mov edx, str.RegistryMachineSystemCurrentControlSetServicesTcpipParameters
lea ecx, [ebp - 4]
call fcn.0040b845
test eax, eax
jns 0x40ab8d
push 0x65
push ebx
call fcn.0040baef
pop ecx
pop ecx
push 0x57
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
jmp 0x40aea2
mov edi, 0x3200
push edi
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x40abb7
push 0x64
push ebx
call fcn.0040baef
pop ecx
pop ecx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
push 8
jmp 0x40ab82
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
mov edx, 0x40372c
call fcn.0040b8b9
test eax, eax
js 0x40abff
mov eax, dword [esi]
sub eax, 1
je 0x40abff
sub eax, 1
je 0x40abf6
sub eax, 1
je 0x40abed
sub eax, 1
jne 0x40abff
mov dword [ebp - 8], 0x400
jmp 0x40ac06
mov dword [ebp - 8], 0x800
jmp 0x40ac06
mov dword [ebp - 8], 0x1000
jmp 0x40ac06
mov dword [ebp - 8], 0x2000
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
mov edx, 0x40373c
call fcn.0040b8b9
mov ebx, 0x40d3fa
test eax, eax
js 0x40ac32
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ac27
sub ecx, edx
jne 0x40ac49
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
mov edx, 0x403744
call fcn.0040b8b9
test eax, eax
js 0x40ac5a
push 0x31ff
push esi
push edi
push ebx
call dword [sym.imp.msvcrt.dll_strncpy_s]
add esp, 0x10
mov edx, str.RegistryMachineSoftwarePoliciesMicrosoftWindows_NTDNSClient
lea ecx, [ebp - 0x14]
call fcn.0040b845
mov dword [ebp - 0x10], 0x410600
test eax, eax
js 0x40ac99
push ecx
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0xc]
push eax
push esi
mov edx, 0x403750
call fcn.0040b8b9
test eax, eax
js 0x40ac99
mov ecx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ac8e
sub ecx, edi
jne 0x40acb4
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
mov edx, 0x403750
call fcn.0040b8b9
test eax, eax
js 0x40ad42
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40acb9
sub ecx, edx
je 0x40ad42
push 0x31ff
push esi
push 0x3200
push ebx
call dword [sym.imp.msvcrt.dll_strncpy_s]
mov eax, ebx
mov dword [0x4105fc], ebx
xor ebx, ebx
add esp, 0x10
mov edx, ebx
mov edi, 0x410600
cmp byte [0x40d3fa], dl
je 0x40ad37
cmp edi, 0x4106c4
jae 0x40ad37
mov cl, byte [eax]
cmp cl, 0x20
je 0x40ad18
cmp cl, 9
je 0x40ad18
cmp cl, 0x2c
je 0x40ad18
test edx, edx
je 0x40ad1d
mov dword [edi], eax
mov edx, ebx
add edi, 4
jmp 0x40ad1d
xor edx, edx
mov byte [eax], bl
inc edx
inc eax
cmp byte [eax], bl
jne 0x40acf2
jmp 0x40ad37
cmp cl, 0x20
je 0x40ade0
cmp cl, 9
je 0x40ade0
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40ad24
jmp 0x40ade0
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
xor ebx, ebx
mov edx, 0x40375c
push esi
mov edi, ebx
call fcn.0040b8b9
test eax, eax
js 0x40ade7
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ad66
sub ecx, edx
je 0x40ade7
push 0x31ff
push esi
push 0x3200
mov edi, 0x40d3fa
push edi
call dword [sym.imp.msvcrt.dll_strncpy_s]
mov edx, ebx
mov dword [0x4105fc], edi
add esp, 0x10
mov eax, edi
mov edi, 0x410600
cmp byte [0x40d3fa], dl
je 0x40adda
cmp edi, 0x4106c4
jae 0x40adda
mov cl, byte [eax]
cmp cl, 0x20
je 0x40adc3
cmp cl, 9
je 0x40adc3
test edx, edx
je 0x40adc8
mov dword [edi], eax
mov edx, ebx
add edi, 4
jmp 0x40adc8
xor edx, edx
mov byte [eax], bl
inc edx
inc eax
cmp byte [eax], bl
jne 0x40ada2
jmp 0x40adda
cmp cl, 0x20
je 0x40ade0
cmp cl, 9
je 0x40ade0
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40adcf
mov byte [eax], bl
mov dword [edi], ebx
xor edi, edi
inc edi
mov eax, dword [ebp - 8]
or dword [0x40d3c8], eax
cmp byte [0x40d3fa], 0
jne 0x40ae2d
push 0x3200
push esi
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x40ae2d
push 0x2e
push esi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x40ae2d
inc eax
push eax
push 0x3200
push 0x40d3fa
call dword [sym.imp.msvcrt.dll_strcpy_s]
add esp, 0xc
test edi, edi
jne 0x40ae82
mov al, byte [0x40d3fa]
mov edx, 0x40d3fa
mov dword [0x4105fc], edx
mov ecx, edx
mov edi, ebx
jmp 0x40ae4f
cmp al, 0x2e
jne 0x40ae4c
inc edi
inc ecx
mov al, byte [ecx]
test al, al
jne 0x40ae47
mov eax, 0x410600
cmp edi, 2
jl 0x40ae80
cmp eax, 0x410608
jae 0x40ae80
push 0x2e
push edx
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
lea edx, [eax + 1]
mov eax, dword [ebp - 0x10]
mov dword [eax], edx
add eax, 4
mov dword [ebp - 0x10], eax
dec edi
jmp 0x40ae58
mov dword [eax], ebx
or dword [0x40d3c8], 1
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
jmp 0x40aea5
push 0xd5
push ebx
call fcn.0040baef
pop ecx
pop ecx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret