Function at 0x404d9d
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 0x404dea
cmp dword [ebp + 0xc], 0
jne 0x404df4
mov eax, 0x80070057
jmp 0x404fb9
push 0x80000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x404e1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404fb7
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x358]
push ecx
call fcn.004064f0
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 0x404e57
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404fb5
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 0x404f76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x7a
je 0x404e89
jmp 0x404fb3
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 0x404eaa
mov dword [ebp - 0x30], 0xe
jmp 0x404fb1
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 0x404ed2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
jmp 0x404faf
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.004064d0
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x404f25
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 0x404f6f
mov ecx, dword [ebp - 0x250]
and ecx, 0xffff
cmp ecx, 0x2e
je 0x404f66
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x250]
push eax
call sub.MSVCRT.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x404f6f
mov dword [ebp - 0x30], 0x80004005
jmp 0x404fad
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x2c], 0
je 0x404f88
mov ecx, dword [ebp - 0x2c]
push ecx
call sub.MSVCRT.dll_free
add esp, 4
cmp dword [ebp - 0x40], 0
je 0x404f98
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x44], 0
je 0x404fa8
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x30]
jmp 0x404fb9
jmp 0x404f76
jmp 0x404f76
jmp 0x404f76
jmp 0x404f76
jmp 0x404f76
jmp 0x404f76
mov esp, ebp
pop ebp
ret