Function at 0x403430
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x424008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ecx
lea eax, [ebp - 0x20c]
push 0x420be4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
js 0x4034b0
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call ebx
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d6ab
add esp, 0xc
test eax, eax
je 0x403639
push 0x421ca0
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4035b6
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x4035b6
cmp dword [ebp - 0x314], 0
je 0x4035b6
push 0x104
lea eax, [ebp - 0x310]
push eax
push str._ProgramW6432_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push str._ProgramW6432_
call ebx
mov edi, eax
lea edx, [ebp - 0x310]
mov esi, str._ProgramW6432_
sub edi, 4
jb 0x403539
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x403542
add edx, 4
add esi, 4
sub edi, 4
jae 0x403528
cmp edi, 0xfffffffc
je 0x40364f
mov al, byte [edx]
cmp al, byte [esi]
jne 0x40357f
cmp edi, 0xfffffffd
je 0x40364f
mov al, byte [edx + 1]
cmp al, byte [esi + 1]
jne 0x40357f
cmp edi, 0xfffffffe
je 0x40364f
mov al, byte [edx + 2]
cmp al, byte [esi + 2]
jne 0x40357f
cmp edi, 0xffffffff
je 0x40364f
mov al, byte [edx + 3]
cmp al, byte [esi + 3]
je 0x40364f
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [ebp - 0x310]
push eax
call esi
lea eax, [ebp - 0x310]
push eax
call ebx
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d6ab
add esp, 0xc
test eax, eax
je 0x403639
push 0
push 0x23
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
js 0x4035fa
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call ebx
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d6ab
add esp, 0xc
test eax, eax
je 0x403639
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call ebx
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d6ab
add esp, 0xc
test eax, eax
jne 0x4036ab
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
push str.__x86_
call ebx
mov esi, eax
lea eax, [ebp - 0x108]
push eax
call ebx
sub eax, esi
cmp eax, 0x104
jae 0x4036be
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov byte [ebp + eax - 0x108], 0
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call ebx
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d6ab
add esp, 0xc
test eax, eax
jne 0x4035b6
jmp 0x403639
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
call fcn.0040ab41
int3