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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x786230
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
test edx, edx
je 0x782a78
mov dword [edx + 4], 0
mov dword [edx], 0
mov dword [edx + 8], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], 0
xor eax, eax
jmp 0x782a94
mov eax, dword [ebp - 0x20]
inc eax
cmp eax, 3
ja 0x782ceb
mov dword [ebp - 0x20], eax
mov eax, dword [eax*4 + 0x9da83c]
mov dword [ebp - 0x10], 2
push 0
push 0
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x782a90
lea edx, [eax + eax]
test eax, eax
mov dword [ebp - 0x64], eax
mov ecx, 0xffffffff
cmovs edx, ecx
push edx
call fcn.0091d83b
mov ecx, dword [ebp - 0x64]
add esp, 4
mov dword [ebp - 0x10], 3
push ecx
push eax
push dword [ebp - 0x24]
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, dword [ebp - 0x24]
test eax, eax
je 0x782cd9
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], 0
push esi
call fcn.00904221
add esp, 4
cmp eax, 7
jbe 0x782b40
sub esp, 0xc
movzx ecx, byte [ebp - 0x48]
mov byte [esp + 4], cl
mov dword [esp + 8], esi
mov dword [esp], eax
lea ecx, [ebp - 0x60]
call fcn.00675f50
jmp 0x782b5e
mov dword [ebp - 0x50], eax
mov ecx, eax
add ecx, eax
push ecx
push esi
lea ecx, [ebp - 0x60]
push ecx
mov esi, eax
call fcn.00935430
add esp, 0xc
mov word [ebp + esi*2 - 0x60], 0
push dword [ebp - 0x24]
call fcn.0091d844
add esp, 4
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x782c88
cmp dword [ebp - 0x4c], 8
lea eax, [ebp - 0x60]
jb 0x782b80
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x28]
cmp ecx, esi
jae 0x782bb7
mov dword [ebp - 0x10], 4
sub esp, 0xc
movzx ecx, byte [ebp - 0x48]
mov byte [esp + 4], cl
mov dword [esp + 8], eax
mov dword [esp], esi
lea ecx, [ebp - 0x3c]
call fcn.00675f50
mov dword [ebp - 0x10], 4
cmp dword [ebp - 0x20], 2
jae 0x782be6
jmp 0x782bfc
lea edi, [ebp - 0x3c]
cmp ecx, 8
jb 0x782bc2
mov edi, dword [ebp - 0x3c]
lea ecx, [esi + esi]
mov dword [ebp - 0x2c], esi
push ecx
push eax
push edi
call fcn.00935430
add esp, 0xc
mov word [edi + esi*2], 0
mov dword [ebp - 0x10], 4
cmp dword [ebp - 0x20], 2
jb 0x782bfc
push 0x9da854
push 0x9da84c
lea eax, [ebp - 0x3c]
push eax
call fcn.00787a20
add esp, 0xc
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00782f50
add esp, 8
test al, al
je 0x782c70
mov eax, dword [ebp - 0x40]
test al, 1
je 0x782c37
cmp eax, 1
jne 0x782c70
cmp dword [ebp - 0x48], 0
jne 0x782c70
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00782840
add esp, 8
test al, al
je 0x782c70
mov eax, dword [ebp - 0x40]
test al, 1
je 0x782c5d
cmp eax, 1
jne 0x782c70
cmp dword [ebp - 0x48], 0
jne 0x782c70
mov eax, dword [ebp - 0x4c]
cmp eax, 7
jbe 0x782ceb
xor ebx, ebx
jmp 0x782c96
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
jb 0x782c7c
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], 0
mov word [eax], 0
mov eax, dword [ebp - 0x4c]
mov bl, 1
cmp eax, 7
jbe 0x782a90
mov ecx, dword [ebp - 0x60]
lea esi, [eax*2 + 2]
cmp esi, 0x1000
jb 0x782cc2
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x782e76
add eax, eax
add eax, 0x25
mov esi, eax
mov ecx, edx
push esi
push ecx
call fcn.0091d82d
add esp, 8
test bl, bl
mov eax, dword [ebp - 0x20]
je 0x782ceb
inc eax
jmp 0x782a94
push esi
call fcn.0091d844
add esp, 4
mov eax, dword [ebp - 0x20]
inc eax
jmp 0x782a94
cmp dword [ebp - 0x2c], 0
jne 0x782dbb
mov dword [ebp - 0x10], 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x782dec
lea edx, [eax + eax]
test eax, eax
mov dword [ebp - 0x20], eax
mov ecx, 0xffffffff
cmovns ecx, edx
push ecx
call fcn.0091d83b
mov ecx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x10], 5
push ecx
mov dword [ebp - 0x20], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x782de1
mov edi, dword [ebp - 0x20]
push edi
call fcn.00904221
add esp, 4
mov edx, dword [ebp - 0x28]
cmp edx, eax
jae 0x782d73
sub esp, 0xc
movzx ecx, byte [ebp - 0x60]
mov byte [esp + 4], cl
mov dword [esp + 8], edi
mov dword [esp], eax
lea ecx, [ebp - 0x3c]
call fcn.00675f50
jmp 0x782d9a
mov ecx, eax
add ecx, eax
cmp edx, 8
jb 0x782d81
mov esi, dword [ebp - 0x3c]
jmp 0x782d84
lea esi, [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
push ecx
push edi
push esi
mov edi, eax
call fcn.00935430
add esp, 0xc
mov word [esi + edi*2], 0
lea eax, [ebp - 0x3c]
push 0x9da854
push 0x9da84c
push eax
call fcn.00787a20
add esp, 0xc
push dword [ebp - 0x20]
call fcn.0091d844
add esp, 4
movsd xmm0, qword [ebp - 0x2c]
mov eax, dword [ebp + 8]
movsd qword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x3c]
movups xmmword [eax], xmm0
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
push dword [ebp - 0x20]
call fcn.0091d844
add esp, 4
mov dword [ebp - 0x10], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x782e82
cmp dword [ebp + 0xc], 0
je 0x782e1e
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], 0
mov edi, dword [ebp - 0x28]
cmp edi, 8
jb 0x782dcf
mov ecx, dword [ebp - 0x3c]
lea esi, [edi*2 + 2]
cmp esi, 0x1000
jb 0x782e64
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x782e95
add edi, edi
add edi, 0x25
mov esi, edi
mov ecx, edx
push esi
push ecx
call fcn.0091d82d
add esp, 8
mov eax, dword [ebp + 8]
jmp 0x782dcf
mov dword [ebp - 0x10], 0
call fcn.00900ce1
push 0x9da8a8
push dword [ebp + 0xc]
push eax
call fcn.0078ca20
add esp, 0xc
jmp 0x782e1e
mov dword [ebp - 0x10], 1
call fcn.00900ce1
nop word cs:[eax + eax]
push ebp
sub esp, 0xc
add ebp, 0xc
push dword [ebp - 0x24]
call fcn.0091d844
add esp, 0x10
pop ebp
ret