Function at 0x1007847
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x100a3a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x82c], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x838], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, ecx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x83c], 0x10
test esi, esi
je 0x100795a
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1007894
sub eax, edx
sar eax, 1
mov dword [ebp - 0x840], eax
add eax, 0xfffffffd
cmp eax, 0x3fc
ja 0x100795a
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x8a0]
test eax, eax
je 0x10078d0
cmp dword [eax], 1
je 0x1007a73
push 0x5c
pop ebx
cmp word [esi], bx
jne 0x10078f3
inc dword [ebp - 0x82c]
mov eax, dword [ebp - 0x82c]
cmp word [esi + eax*2], bx
je 0x10078d8
cmp eax, 2
jae 0x10079a1
mov ecx, dword [ebp - 0x838]
test ecx, ecx
jne 0x1007928
lea eax, [ebp - 0x83c]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x1007921
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100795f
lea ecx, [ebp - 0x28]
jmp 0x1007928
inc ecx
inc ecx
cmp word [ecx], bx
je 0x1007926
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1007932
mov edx, dword [ebp - 0x840]
sub eax, ebx
sar eax, 1
lea edx, [eax + edx + 4]
mov eax, 0x400
cmp edx, eax
jb 0x1007970
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xc0000bbd
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01008013
leave
ret 0xc
cmp dword [ebp - 0x82c], 1
mov edx, 0x1001244
je 0x1007983
mov edx, 0x10019d4
push esi
push edx
push ecx
push 0x10019c0
push eax
lea eax, [ebp - 0x828]
push eax
call fcn.010026fa
add esp, 0x18
lea esi, [ebp - 0x828]
mov eax, dword [edi + 0x8a0]
xor ecx, ecx
inc ecx
xor ebx, ebx
mov dword [edi + 0x8c], ecx
cmp eax, ebx
je 0x10079be
cmp dword [eax], ecx
je 0x1007a73
cmp dword [edi + 0x8a4], ebx
je 0x1007a3e
push esi
mov ecx, edi
call fcn.01007592
mov ecx, dword [edi + 0x8a0]
cmp ecx, ebx
je 0x10079e1
cmp dword [ecx], 1
je 0x1007a73
cmp eax, ebx
jne 0x1007a73
mov esi, dword [edi + 0x6c]
jmp 0x1007a37
lea eax, [ebp - 0x834]
push eax
push ebx
push esi
push dword [edi + 0x2c]
call sub.pdh.dll_PdhAddCounterW
mov ecx, dword [edi + 0x8a0]
cmp ecx, ebx
je 0x1007a0e
cmp dword [ecx], 1
je 0x1007a73
cmp eax, ebx
jne 0x1007a53
push esi
push dword [ebp - 0x834]
mov ecx, edi
call fcn.01007796
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1007a25
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2 + 2]
cmp word [esi], bx
jne 0x10079ee
jmp 0x1007a73
lea eax, [ebp - 0x834]
push eax
push ebx
push esi
push dword [edi + 0x2c]
call sub.pdh.dll_PdhAddCounterW
cmp eax, ebx
je 0x1007a65
cmp dword [ebp - 0x830], ebx
je 0x1007a73
push eax
push esi
call dword [ebp - 0x830]
jmp 0x1007a73
push esi
push dword [ebp - 0x834]
mov ecx, edi
call fcn.01007796
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x100795f