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

Disassembly:
sub esp, 0x218
mov eax, dword [0x4705d0]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x220]
and dword [esp + 8], 0
push ebx
push ebp
mov ebp, dword [esp + 0x22c]
push esi
mov esi, dword [esp + 0x228]
push edi
push 0x207
mov dword [esp + 0x18], eax
lea eax, [esp + 0x21]
push 0
push eax
mov dword [esp + 0x1c], esi
mov byte [esp + 0x28], 0
call fcn.004464f0
add esp, 0xc
test ebp, ebp
je 0x40f2a0
mov byte [ebp], 0
test esi, esi
je 0x40f833
cmp byte [esi], 0
je 0x40f833
test ebp, ebp
je 0x40f833
mov ebx, dword [esp + 0x238]
cmp ebx, 1
jl 0x40f833
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
cmp eax, 0x104
jl 0x40f2fa
push esi
call edi
inc eax
cmp ebx, eax
jge 0x40f2e5
mov eax, ebx
jmp 0x40f2e9
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
inc eax
jmp 0x40f835
push 0x45c5c8
push esi
call fcn.00445d80
pop ecx
pop ecx
test eax, eax
jne 0x40f31c
push 0x45b334
push esi
call fcn.00445d80
pop ecx
pop ecx
test eax, eax
je 0x40f326
push esi
call fcn.0040bf89
test eax, eax
jne 0x40f2d9
lea eax, [ebx + 0x10000]
mov ecx, 0x1000
cmp eax, ecx
jg 0x40f337
mov eax, ecx
push 1
push eax
call fcn.004462a8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40f833
push dword [esp + 0x10]
mov eax, ebx
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_sPath
dec eax
push eax
push ebp
push 0
push 3
call fcn.0044129f
add esp, 0x18
push ebp
call fcn.0040bf89
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
test eax, eax
jne 0x40f37b
mov byte [ebp], 0
jmp 0x40f3ba
push 0
push 0x45c510
push ebp
call fcn.0043fbb2
push ebp
call edi
cmp byte [eax + ebp - 1], 0x5c
je 0x40f39a
push 0x45a954
push ebp
call ebx
push dword [esp + 0x10]
call edi
cmp eax, dword [esp + 0x238]
jge 0x40f3b0
push dword [esp + 0x10]
push ebp
call ebx
cmp byte [ebp], 0
jne 0x40f63a
push esi
push 0x102
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x40f3d8
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f40c
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f3ff
mov eax, dword [esp + 0x238]
jmp 0x40f403
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f63a
cmp dword [esp + 0x14], 0
je 0x40f42a
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40f42d
mov byte [esi], 0
push 3
push 0x45a954
push esi
call fcn.0043fbb2
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f476
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f469
mov eax, dword [esp + 0x238]
jmp 0x40f46d
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f63a
push 0x102
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 3
push 0x45a954
push esi
call fcn.0043fbb2
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f4de
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f4d1
mov eax, dword [esp + 0x238]
jmp 0x40f4d5
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f63a
push 0x102
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x40f506
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f53a
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f52d
mov eax, dword [esp + 0x238]
jmp 0x40f531
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f63a
push 0x102
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x40f562
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f596
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f589
mov eax, dword [esp + 0x238]
jmp 0x40f58d
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f63a
push str.IEXPLORE.EXE
push dword [esp + 0x14]
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x40f5db
push str.Internet_Explore
push dword [esp + 0x14]
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x40f5db
push 0x45c550
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40f63a
push 0x102
push esi
push 0x45c540
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x40f5fe
push 0x45a954
push esi
call ebx
push str.Internet_Explorer_
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f63a
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f62d
mov eax, dword [esp + 0x238]
jmp 0x40f631
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
and dword [esp + 0x14], 0
cmp byte [ebp], 0
jne 0x40f697
mov eax, dword [esp + 0x14]
push esi
inc eax
push eax
call fcn.0040d2df
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x40f663
push 0x45a954
push esi
call ebx
push dword [esp + 0x10]
push esi
call ebx
push esi
call fcn.0040bf89
test eax, eax
je 0x40f697
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f68a
mov eax, dword [esp + 0x238]
jmp 0x40f68e
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 3
jl 0x40f63f
cmp byte [ebp], 0
jne 0x40f800
mov eax, dword [esp + 0x238]
add eax, 0xfffffc00
push eax
push esi
push 0x45c524
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
and dword [esp + 0x14], 0
push 0
push 1
push 0x103
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x24]
push 0x45c510
push esi
call fcn.004432d3
test eax, eax
je 0x40f766
cmp byte [esp + 0x1c], 0
je 0x40f766
lea eax, [esp + 0x1c]
push eax
call edi
lea ecx, [esp + 0x1c]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40f710
push 0x45a954
lea eax, [esp + 0x20]
push eax
call ebx
push dword [esp + 0x10]
lea eax, [esp + 0x20]
push eax
call ebx
lea eax, [esp + 0x1c]
push eax
call fcn.0040bf89
test eax, eax
je 0x40f758
lea eax, [esp + 0x1c]
push eax
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f743
mov eax, dword [esp + 0x238]
jmp 0x40f74b
lea eax, [esp + 0x1c]
push eax
call edi
inc eax
push eax
lea eax, [esp + 0x20]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
inc dword [esp + 0x14]
cmp byte [ebp], 0
je 0x40f6ca
cmp byte [ebp], 0
jne 0x40f800
mov ebx, dword [esp + 0x10]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x45c2bc
push 0
push esi
call fcn.0043feaa
push esi
call fcn.0040bf89
test eax, eax
je 0x40f7b6
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f7a9
mov eax, dword [esp + 0x238]
jmp 0x40f7ad
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [ebp], 0
jne 0x40f804
lea eax, [esp + 0x18]
push eax
push esi
push 0x102
push 0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x40f804
cmp byte [esi], 0
je 0x40f804
push esi
call edi
inc eax
cmp dword [esp + 0x238], eax
jge 0x40f7f1
mov eax, dword [esp + 0x238]
jmp 0x40f7f5
push esi
call edi
inc eax
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x40f804
mov ebx, dword [esp + 0x10]
push esi
call fcn.00445e06
cmp byte [ebp], 0
pop ecx
jne 0x40f2f2
push ebx
call edi
mov ecx, eax
mov eax, dword [esp + 0x238]
inc ecx
cmp eax, ecx
jl 0x40f82a
push ebx
call edi
inc eax
push eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004464bf
add esp, 0x218
ret 0x10