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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x1004f7e9
lea eax, [ebp + 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], 0x4741
mov dword [ebp - 0x50], 0x1000ca38
cmp dword [ebp - 0x34], 0x4874
jle 0x1004f645
and dword [ebp - 0x10], 0
jmp 0x1004f5ea
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x5be5
jge 0x1004f645
and dword [ebp - 8], 0
jmp 0x1004f600
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x6070
jge 0x1004f643
and dword [ebp - 0xc], 0
jmp 0x1004f616
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x5f4a
jge 0x1004f641
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0xc]
and eax, dword [ebp - 0x10]
cdq
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
push dword [ebp - 0x6c]
push dword [ebp - 0x70]
mov ecx, 0x10082bb8
call fcn.1001d55e
jmp 0x1004f60f
jmp 0x1004f5f9
jmp 0x1004f5e3
mov eax, dword [ebp - 0x3c]
movzx eax, byte [eax]
test eax, eax
je 0x1004f7c1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [eax], 0
jmp 0x1004f675
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax], 0xc
jle 0x1004f7bf
mov dword [ebp - 0x2c], 0x5c91
mov dword [ebp - 0x48], 0x1000caa0
cmp dword [ebp - 0x2c], 0x5e6c
jle 0x1004f6ed
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
and dword [ebp - 0x18], 0
jmp 0x1004f6ab
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x631f
jge 0x1004f6ed
and dword [ebp - 0x1c], 0
jmp 0x1004f6c1
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x2d36
jge 0x1004f6eb
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sar eax, cl
cdq
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], edx
push dword [ebp - 0x74]
push dword [ebp - 0x78]
mov ecx, 0x10082bb8
call fcn.1001d55e
jmp 0x1004f6ba
jmp 0x1004f6a4
mov byte [ebp - 1], 0
cmp dword [ebp - 0x2c], 0x5ae6
jge 0x1004f707
mov edx, dword [ebp - 0x48]
mov ecx, 0x10082bb8
call fcn.100202a3
mov dword [ebp - 0x30], 0x6ae2
mov dword [ebp - 0x4c], 0x1000caf0
cmp dword [ebp - 0x30], 0x6d62
jle 0x1004f792
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
and dword [ebp - 0x20], 0
jmp 0x1004f735
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x5f80
jge 0x1004f792
and dword [ebp - 0x24], 0
jmp 0x1004f74b
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x3f89
jge 0x1004f790
and dword [ebp - 0x28], 0
jmp 0x1004f761
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x36c0
jge 0x1004f78e
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
sar eax, cl
cdq
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edx
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
mov ecx, 0x10082bb8
call fcn.1001d55e
jmp 0x1004f75a
jmp 0x1004f744
jmp 0x1004f72e
movzx eax, byte [ebp - 1]
test eax, eax
je 0x1004f7a4
push 0
push 0
call dword [sym.imp.GDI32.dll_RectInRegion]
cmp dword [ebp - 0x30], 0x684a
jge 0x1004f7ba
mov edx, dword [ebp - 0x4c]
mov ecx, 0x10082bb8
call fcn.100202a3
jmp 0x1004f66a
jmp 0x1004f7d1
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
cmp dword [ebp - 0x34], 0x4668
jge 0x1004f7e7
mov edx, dword [ebp - 0x50]
mov ecx, 0x10082bb8
call fcn.100202a3
jmp 0x1004f835
lea eax, [ebp + 0xc]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x54]
movzx eax, byte [eax]
test eax, eax
je 0x1004f81e
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x38]
mov dword [ecx], eax
jmp 0x1004f835
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov eax, dword [eax]
mov eax, dword [eax]
and dword [eax + 0xc], 0
mov esp, ebp
pop ebp
ret