Function at 0x10045815
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x100459c9
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
neg eax
je 0x100458ca
mov dword [ebp - 0x5c], 1
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x5c]
cmp dword [eax], ecx
jge 0x1004589e
mov dword [ebp - 0x18], 1
jmp 0x100458a2
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
mov byte [ebp - 1], 0
movzx eax, byte [ebp - 1]
test eax, eax
je 0x100458c5
push 0x11c
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x100459c7
mov dword [ebp - 8], 0
jmp 0x100458da
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 1
jge 0x100458ed
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x10], 0
jmp 0x100458d3
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx]
cmp dword [ebp + eax - 0x10], ecx
jg 0x10045907
mov dword [ebp - 0x20], 1
jmp 0x1004590b
and dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
cmp dword [ebp - 0x20], eax
je 0x10045926
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
je 0x10045926
mov dword [ebp - 0x28], 1
jmp 0x1004592a
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp dword [ebp - 0x28], eax
je 0x10045947
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 0x10], 0
jne 0x10045947
and dword [ebp - 0x2c], 0
jmp 0x1004594e
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp dword [ebp - 0x2c], eax
je 0x10045961
mov dword [ebp - 0x30], 1
jmp 0x10045965
and dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x64]
mov eax, dword [eax]
cmp dword [ebp - 0x30], eax
jge 0x10045978
mov dword [ebp - 0x34], 1
jmp 0x1004597c
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp dword [ebp - 0x34], eax
jle 0x1004598f
mov dword [ebp - 0x38], 1
jmp 0x10045993
and dword [ebp - 0x38], 0
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp + eax - 0x10]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
sub ecx, 0x7fffaa23
cmp dword [eax], ecx
jge 0x100459bb
mov dword [ebp - 0x3c], 1
jmp 0x100459bf
and dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x3c]
mov dword [eax], ecx
jmp 0x100459d6
push 0x1c5
push 0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esp, ebp
pop ebp
ret