Function at 0x407c60
Capabilities:
Delete file
Get common file path
Query environment variable
Resolve function by parsing pe exports
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x44a427
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x45e560]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45e560]
xor eax, esp
push eax
lea eax, [esp + 0x1bc]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1cc]
mov dword [esp + 0x14], eax
xor ebx, ebx
mov eax, 0xf
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
mov dword [esp + 0x1c4], ebx
mov dword [esp + 0x88], eax
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
push ebx
mov eax, 0x401
lea edi, [esp + 0x3c]
mov byte [esp + 0x1c8], 1
call fcn.00402610
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x407cf8
ja 0x407cf8
call fcn.00446bb1
mov eax, dword [esp + 0x3c]
mov ebp, 0x10
cmp dword [esp + 0x50], ebp
jae 0x407d0b
lea eax, [esp + 0x3c]
push 0x400
push eax
push str._programfiles_Impulse
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebp
jae 0x407d2a
lea eax, [esp + 0x3c]
cmp eax, ebx
jne 0x407d3e
xor eax, eax
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x40]
call fcn.00402a60
jmp 0x407d6c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407d41
mov ecx, dword [esp + 0x4c]
sub eax, edx
cmp eax, ecx
ja 0x407d60
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x40]
call fcn.00402a60
jmp 0x407d6c
push ebx
sub eax, ecx
lea edi, [esp + 0x3c]
call fcn.00402610
lea ecx, [esp + 0x38]
push ecx
mov edi, 0x451e80
lea esi, [esp + 0x20]
call fcn.00409510
add esp, 4
mov esi, eax
mov byte [esp + 0x1c4], 2
mov ecx, dword [esp + 0x74]
cmp dword [esp + 0x88], ebp
jae 0x407d9d
lea ecx, [esp + 0x74]
cmp dword [esi + 0x18], ebp
jb 0x407da7
mov eax, dword [esi + 4]
jmp 0x407daa
lea eax, [esi + 4]
cmp ecx, eax
je 0x407dc7
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x78]
call fcn.00402a60
push 0xffffffffffffffff
push ebx
push esi
lea ecx, [esp + 0x7c]
call fcn.00402b00
mov byte [esp + 0x1c4], 1
cmp dword [esp + 0x34], ebp
jb 0x407de2
mov edx, dword [esp + 0x20]
push edx
call fcn.0040e8c6
add esp, 4
mov eax, dword [esp + 0x74]
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], ebx
cmp dword [esp + 0x88], ebp
jae 0x407e1d
lea eax, [esp + 0x74]
lea ecx, [esp + 0x8c]
push ecx
push eax
call fcn.00419a40
test eax, eax
jne 0x407e70
cmp dword [esp + 0x88], ebp
jb 0x407e45
mov edx, dword [esp + 0x74]
push edx
call fcn.0040e8c6
add esp, 4
mov dword [esp + 0x88], 0xf
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], 0
cmp dword [esp + 0x50], ebp
jb 0x408174
mov eax, dword [esp + 0x3c]
push eax
jmp 0x40816c
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], ebp
jae 0x407e7e
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x14]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push ecx
mov ecx, str.PolicyKey.exe
mov byte [eax + 0xa4], 1
mov byte [eax + 0xa6], 1
call fcn.00403820
call fcn.00406d00
mov ebp, str.PolicyKey.exe
add esp, 0x1c
shr ebp, 0x10
mov bl, 3
lea ecx, [ecx]
push 0
sub esp, 0x1c
mov edi, esp
mov dword [esp + 0x38], esp
mov dword [edi + 0x18], 0xf
mov dword [edi + 0x14], 0
mov dword [esp + 0x38], edi
mov byte [edi + 4], 0
mov byte [esp + 0x1e4], bl
test ebp, ebp
jne 0x407efb
mov edx, str.PolicyKey.exe
movzx esi, dx
call fcn.004068d0
jmp 0x407f05
mov ecx, str.PolicyKey.exe
call fcn.00402f20
mov byte [esp + 0x1e4], 1
call fcn.00406a80
add esp, 0x20
cmp al, 1
jne 0x407f26
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x407ec0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.PolicyKey.exe
call esi
push str.updateit.exe
call esi
push str.Config.xml
call esi
push str.LogFile.txt
call esi
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0xf4]
cmp ecx, 0x401
lea edi, [ebx + 0xe0]
jge 0x407f80
jb 0x407f72
push 0xffffffffffffffff
push 0x401
mov ecx, edi
call fcn.00402a60
jmp 0x407f80
mov eax, 0x401
push 0
sub eax, ecx
call fcn.00402610
mov eax, dword [edi + 0x14]
test eax, eax
je 0x407f8e
ja 0x407f8e
call fcn.00446bb1
mov esi, 0x10
cmp dword [edi + 0x18], esi
jb 0x407f9d
mov eax, dword [edi + 4]
jmp 0x407fa0
lea eax, [edi + 4]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [edi + 0x18], esi
jb 0x407fb6
mov eax, dword [edi + 4]
jmp 0x407fb9
lea eax, [edi + 4]
test eax, eax
je 0x407fc9
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fc0
sub eax, edx
mov ecx, dword [edi + 0x14]
cmp eax, ecx
ja 0x407fdc
push 0xffffffffffffffff
push eax
mov ecx, edi
call fcn.00402a60
jmp 0x407fe5
push 0
sub eax, ecx
call fcn.00402610
cmp dword [edi + 0x18], esi
jb 0x407fef
mov eax, dword [edi + 4]
jmp 0x407ff2
lea eax, [edi + 4]
mov ecx, dword [ebx + 0x60]
push ecx
push eax
push str._s_s.exe
lea edx, [ebx + 0xa8]
call fcn.00402410
add esp, 0xc
cmp dword [edi + 0x18], esi
jb 0x408014
mov edi, dword [edi + 4]
jmp 0x408017
add edi, 4
mov esi, ebx
add esi, 0xc4
push edi
push str._sconfig.dat
mov edx, esi
call fcn.00402410
mov ebx, 0x10
add esp, 8
cmp dword [esi + 0x18], ebx
jb 0x40803e
mov eax, dword [esi + 4]
jmp 0x408041
lea eax, [esi + 4]
lea edx, [esp + 0x8c]
push edx
push eax
call fcn.00419a40
test eax, eax
jne 0x40805a
mov edi, esi
call fcn.00409260
mov ebp, 0xf
xor esi, esi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], esi
mov byte [esp + 0x58], 0
push esi
mov eax, 0x401
lea edi, [esp + 0x58]
mov byte [esp + 0x1c8], 4
call fcn.00402610
mov eax, dword [esp + 0x68]
cmp eax, esi
je 0x408094
ja 0x408094
call fcn.00446bb1
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x6c], ebx
jae 0x4080a2
lea eax, [esp + 0x58]
push 0x400
push eax
push str._allusersprofile_Start_MenuProgramsStartupPolicyKey.lnk
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x6c], ebx
jae 0x4080c1
lea eax, [esp + 0x58]
cmp eax, esi
jne 0x4080d5
xor eax, eax
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x5c]
call fcn.00402a60
jmp 0x408103
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4080d8
mov ecx, dword [esp + 0x68]
sub eax, edx
cmp eax, ecx
ja 0x4080f7
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x5c]
call fcn.00402a60
jmp 0x408103
push esi
sub eax, ecx
lea edi, [esp + 0x58]
call fcn.00402610
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x6c], ebx
jae 0x408111
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x6c], ebx
jb 0x40812b
mov eax, dword [esp + 0x58]
push eax
call fcn.0040e8c6
add esp, 4
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], esi
mov byte [esp + 0x58], 0
cmp dword [esp + 0x88], ebx
jb 0x40814e
mov ecx, dword [esp + 0x74]
push ecx
call fcn.0040e8c6
add esp, 4
mov dword [esp + 0x88], ebp
mov dword [esp + 0x84], esi
mov byte [esp + 0x74], 0
cmp dword [esp + 0x50], ebx
jb 0x408174
mov edx, dword [esp + 0x3c]
push edx
call fcn.0040e8c6
add esp, 4
mov ecx, dword [esp + 0x1bc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.0042d9c5
add esp, 0x1b4
ret 4