Function at 0x48583163
Capabilities:
Get windows directory from kuser_shared_data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x4858c26c]
push ebx
push esi
xor ebx, ebx
push ebx
push 0x24
mov dword [ebp - 4], eax
lea eax, [ebp - 0x90]
push eax
push 0x17
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
mov esi, eax
cmp esi, ebx
jge 0x485831e1
xor eax, eax
mov ecx, 0x4858c644
inc eax
lock xadd dword [ecx], eax
inc eax
push 0x20
pop ecx
cdq
idiv ecx
push esi
push 0x48581504
push 3
push 1
shl edx, 4
mov eax, edx
mov dword [eax + 0x4858c660], 0x23d
mov dword [eax + 0x4858c664], esi
mov dword [eax + 0x4858c668], ebx
mov dword [eax + 0x4858c66c], ebx
call sub.ntdll.dll_DbgPrintEx
add esp, 0x10
mov eax, esi
jmp 0x4858351a
lea eax, [ebp - 0x14]
push 0x485814f4
push eax
call dword [sym.imp.ntdll.dll_wcscpy]
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.ntdll.dll_wcslen]
shl eax, 1
mov word [ebp - 0x20], ax
mov eax, dword [ebp - 0x20]
add esp, 0xc
add eax, 2
mov word [ebp - 0x1e], ax
cmp dword [0x7ffe02c0], 1
push 0x43
pop eax
jne 0x4858321f
push 0x41
pop eax
cmp ax, 0x5a
mov dword [ebp - 0x24], eax
ja 0x48583505
movzx ecx, ax
sub ecx, 0x41
push edi
mov edi, dword [sym.imp.ntdll.dll_NtClose]
mov dword [ebp - 0x3c], ecx
xor esi, esi
inc esi
mov eax, esi
shl eax, cl
test dword [ebp - 0x90], eax
je 0x485834ef
mov eax, dword [ebp - 0x1c]
mov cx, word [ebp - 0x24]
mov word [eax + 8], cx
push 0x21
lea eax, [ebp - 0x20]
mov dword [ebp - 0x4c], eax
push 3
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x54]
push eax
push 0x100180
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x54], 0x18
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x48], 0x40
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
call dword [sym.imp.ntdll.dll_NtOpenFile]
mov ecx, eax
cmp ecx, ebx
jge 0x485832e6
mov edx, 0x4858c644
mov eax, esi
lock xadd dword [edx], eax
inc eax
push 0x20
pop esi
cdq
idiv esi
push ecx
shl edx, 4
mov eax, edx
mov dword [eax + 0x4858c660], 0x281
mov dword [eax + 0x4858c664], ecx
mov dword [eax + 0x4858c668], ebx
mov dword [eax + 0x4858c66c], ebx
lea eax, [ebp - 0x20]
push eax
push 0x485814bc
push 3
push 1
call sub.ntdll.dll_DbgPrintEx
add esp, 0x14
jmp 0x485834ef
push 4
push 8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ntdll.dll_NtQueryVolumeInformationFile]
mov ecx, eax
cmp ecx, ebx
jge 0x48583352
mov edx, 0x4858c644
mov eax, esi
lock xadd dword [edx], eax
inc eax
push 0x20
pop esi
cdq
idiv esi
push ecx
push dword [ebp - 0x18]
shl edx, 4
mov eax, edx
mov dword [eax + 0x4858c660], 0x297
mov dword [eax + 0x4858c664], ecx
mov dword [eax + 0x4858c668], ebx
mov dword [eax + 0x4858c66c], ebx
lea eax, [ebp - 0x20]
push eax
push 0x48581468
push 3
push 1
call sub.ntdll.dll_DbgPrintEx
add esp, 0x18
jmp 0x48583463
test byte [ebp - 0x28], 0x17
je 0x48583374
push dword [ebp - 0x28]
lea eax, [ebp - 0x20]
push eax
push 0x48581428
push 3
push esi
call sub.ntdll.dll_DbgPrintEx
add esp, 0x14
jmp 0x48583463
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0x20
push 8
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
cmp esi, ebx
jne 0x485833a8
push 0x20
push 0x485813e8
push 3
push 1
call sub.ntdll.dll_DbgPrintEx
add esp, 0x10
jmp 0x48583463
mov eax, dword [ebp - 0x24]
mov ebx, dword [sym.imp.ntdll.dll_RtlUpcaseUnicodeChar]
mov word [esi + 0xc], ax
mov ecx, dword [ebp - 0x2c]
mov dword [esi + 0x18], ecx
mov ecx, dword [ebp - 0x28]
push eax
mov dword [esi + 0x1c], ecx
call ebx
xor ecx, ecx
mov cx, word [0x7ffe0030]
mov word [ebp - 0x2e], ax
push ecx
call ebx
mov cx, word [ebp - 0x2e]
cmp cx, ax
jne 0x485833e1
or dword [esi + 8], 8
push 3
push 0x18
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ntdll.dll_NtQueryVolumeInformationFile]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x30], eax
jge 0x4858346d
xor eax, eax
mov ecx, 0x4858c644
inc eax
lock xadd dword [ecx], eax
inc eax
push 0x20
pop ecx
cdq
idiv ecx
mov ecx, dword [ebp - 0x30]
push ecx
push dword [ebp - 0x18]
mov eax, edx
shl eax, 4
mov dword [eax + 0x4858c660], 0x2e7
mov dword [eax + 0x4858c664], ecx
mov dword [eax + 0x4858c668], ebx
mov dword [eax + 0x4858c66c], ebx
lea eax, [ebp - 0x20]
push eax
push 0x48581398
push 3
push 1
call sub.ntdll.dll_DbgPrintEx
add esp, 0x18
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x18]
call edi
jmp 0x485834ef
push dword [ebp - 0x18]
call edi
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
push dword [ebp - 0x64]
call dword [sym.imp.ntdll.dll_RtlExtendedIntegerMultiply]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
push dword [ebp - 0x58]
push edx
push eax
call dword [sym.imp.ntdll.dll_RtlExtendedIntegerMultiply]
mov dword [esi + 0x10], eax
mov ecx, eax
mov eax, edx
cmp eax, ebx
mov dword [esi + 0x14], edx
jl 0x485834ba
jg 0x485834aa
cmp ecx, 0x2000000
jbe 0x485834ba
sub ecx, 0x2000000
sbb eax, ebx
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], eax
jmp 0x485834c0
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov eax, dword [0x4858c86c]
mov dword [esi + 4], eax
mov dword [esi], 0x4858c868
mov dword [eax], esi
lea eax, [ebp - 0x20]
push eax
push 0x48581360
push 3
mov dword [0x4858c86c], esi
or dword [esi + 8], 1
push 1
call sub.ntdll.dll_DbgPrintEx
add esp, 0x10
mov ecx, dword [ebp - 0x3c]
inc dword [ebp - 0x24]
inc ecx
cmp word [ebp - 0x24], 0x5a
mov dword [ebp - 0x3c], ecx
jbe 0x4858323c
pop edi
cmp dword [0x4858c868], 0x4858c868
jne 0x48583518
mov eax, 0xc00000e9
jmp 0x4858351a
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.4858a663
leave
ret