Function at 0x404a07
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], 0
cmp dword [ebp + 8], 0
je 0x404a54
cmp dword [ebp + 0xc], 0
jne 0x404a5e
mov eax, 0x80070057
jmp 0x404c23
push 0x80000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x404a84
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404c21
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x358]
push ecx
call fcn.00406090
add esp, 8
push 1
lea edx, [ebp - 0x358]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x404ac1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404c1f
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x404be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x7a
je 0x404af3
jmp 0x404c1d
mov edx, dword [ebp - 0x38]
push edx
call sub.MSVCRT.dll_malloc
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x404b14
mov dword [ebp - 0x30], 0xe
jmp 0x404c1b
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x404b3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404c19
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_wcscpy
add esp, 8
push 0x103
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x250]
push edx
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0x4a], 0
push 0x5c
lea eax, [ebp - 0x250]
push eax
call fcn.00406070
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x404b8f
mov ecx, dword [ebp - 0x28]
mov word [ecx], 0
mov dword [ebp - 0x48], 0x10
lea edx, [ebp - 0x48]
push edx
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x404bd9
mov ecx, dword [ebp - 0x250]
and ecx, 0xffff
cmp ecx, 0x2e
je 0x404bd0
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x250]
push eax
call sub.MSVCRT.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x404bd9
mov dword [ebp - 0x30], 0x80004005
jmp 0x404c17
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x2c], 0
je 0x404bf2
mov ecx, dword [ebp - 0x2c]
push ecx
call sub.MSVCRT.dll_free
add esp, 4
cmp dword [ebp - 0x40], 0
je 0x404c02
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x44], 0
je 0x404c12
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x30]
jmp 0x404c23
jmp 0x404be0
jmp 0x404be0
jmp 0x404be0
jmp 0x404be0
jmp 0x404be0
jmp 0x404be0
mov esp, ebp
pop ebp
ret