Function at 0x4685f0
Capabilities:
Check if file exists
Create process on windows
Delete file
Get file attributes
Get system information on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d5557
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x517ba0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bh, byte [ebp + 0x10]
xor edi, edi
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov bl, byte [ebp + 0x14]
mov dword [ebp - 0x43c], eax
test bh, bh
je 0x4686bc
push 0x4f0d00
push 0x4eb4bc
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x468660
lea ecx, [ebp - 0x49c]
push ecx
call eax
jmp 0x46866d
lea eax, [ebp - 0x49c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
movzx eax, word [ebp - 0x49c]
cmp eax, 6
je 0x4686b7
cmp eax, 9
je 0x4686b0
push eax
lea eax, [ebp - 0x218]
push 0x4f0d18
push eax
call fcn.00402e90
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x10
push 0x4e23b8
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x4689dd
mov edi, 0x51c
jmp 0x4686bc
mov edi, 0x51d
push esi
call fcn.0049fbd0
push eax
push esi
call fcn.0049fd60
add esp, 0xc
mov dword [ebp - 0x424], eax
push 0x103
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4689c3
test bh, bh
je 0x468837
push 0x4f0d58
call fcn.0049fbd0
push eax
push 0x4f0d58
call fcn.0049fd60
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
call fcn.0049fbd0
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0049fd60
add esp, 0x18
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x42c]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x430]
call fcn.0049f8a0
mov esi, eax
push 0x4ea810
mov byte [ebp - 4], 4
call fcn.0049fbd0
push eax
push 0x4ea810
call fcn.0049fd60
add esp, 0xc
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x428]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x434]
mov ecx, esi
push eax
call fcn.0049f8a0
push eax
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 6
call fcn.0049f9d0
mov ecx, dword [ebp - 0x434]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x4687bb
call fcn.0049fda0
mov ecx, dword [ebp - 0x428]
mov byte [ebp - 4], 8
test ecx, ecx
je 0x4687ce
call fcn.0049fda0
mov ecx, dword [ebp - 0x438]
mov byte [ebp - 4], 9
test ecx, ecx
je 0x4687e1
call fcn.0049fda0
mov ecx, dword [ebp - 0x42c]
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x4687f4
call fcn.0049fda0
mov ecx, dword [ebp - 0x430]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x468807
call fcn.0049fda0
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0
push 0x2e
push eax
call fcn.004a861e
xor ecx, ecx
push 0x4f0d7c
push 0x104
mov word [eax], cx
lea eax, [ebp - 0x218]
push eax
call fcn.004b8a72
add esp, 0x14
test edi, edi
je 0x4688b4
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x4f0d8c
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.004a861e
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.004b8a72
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004b7f10
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.004237d0
add esp, 0x28
test al, al
jne 0x4688b4
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4689c3
lea ecx, [ebp - 0x424]
call fcn.0049f770
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, eax
mov edx, 0x4efff8
mov dword [ebp - 0x460], 0
test bl, bl
mov dword [ebp - 0x440], 0
mov eax, 0x4f0cf4
mov dword [ebp - 0x478], 0x3c
cmove eax, edx
mov dword [ebp - 0x474], 0x40
mov dword [ebp - 0x46c], eax
xorps xmm0, xmm0
mov eax, dword [ebp - 0x43c]
mov dword [ebp - 0x45c], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x478]
push eax
movlpd qword [ebp - 0x458], xmm0
movlpd qword [ebp - 0x450], xmm0
movlpd qword [ebp - 0x448], xmm0
mov dword [ebp - 0x470], 0
mov dword [ebp - 0x464], ecx
call esi
test eax, eax
je 0x468958
mov bl, 1
jmp 0x468996
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x468967
mov bl, 1
jmp 0x4689b0
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x478]
push eax
call esi
xor bl, bl
test eax, eax
je 0x4689b0
mov esi, dword [ebp - 0x440]
test esi, esi
je 0x4689b0
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bh, bh
je 0x4689c5
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4689c5
xor bl, bl
mov ecx, dword [ebp - 0x424]
mov dword [ebp - 4], 0xd
test ecx, ecx
je 0x4689db
call fcn.0049fda0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4433
mov esp, ebp
pop ebp
ret