Function at 0x46b470
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 0x4d6fe7
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x517b80]
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 ebx, dword [ebp + 0xc]
xor edi, edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x488], ebx
mov bh, byte [ebp + 0x10]
mov bl, byte [ebp + 0x14]
mov dword [ebp - 0x49c], eax
test bh, bh
je 0x46b545
push 0x4f3d38
push 0x4ee48c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
lea eax, [ebp - 0x448]
push eax
test esi, esi
je 0x46b4f0
mov ecx, esi
call dword [0x4dc8a4]
call esi
jmp 0x46b4f6
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
movzx eax, word [ebp - 0x448]
cmp eax, 6
je 0x46b540
cmp eax, 9
je 0x46b539
push eax
lea eax, [ebp - 0x218]
push 0x4f3d50
push eax
call fcn.00402dc0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x10
push 0x4e4e40
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x46b878
mov edi, 0x51c
jmp 0x46b545
mov edi, 0x51d
mov esi, dword [ebp - 0x488]
push esi
mov dword [ebp - 0x424], 0
call fcn.004a27e0
push eax
push esi
call fcn.004a29e0
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 0x46b85e
test bh, bh
je 0x46b6d0
push 0x4f3d90
call fcn.004a27e0
push eax
push 0x4f3d90
call fcn.004a29e0
mov dword [ebp - 0x488], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
call fcn.004a27e0
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004a29e0
add esp, 0x18
mov dword [ebp - 0x490], eax
lea eax, [ebp - 0x490]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x498]
push eax
lea ecx, [ebp - 0x488]
call fcn.004a24b0
mov esi, eax
push 0x4ed808
mov byte [ebp - 4], 4
call fcn.004a27e0
push eax
push 0x4ed808
call fcn.004a29e0
add esp, 0xc
mov dword [ebp - 0x48c], eax
lea eax, [ebp - 0x48c]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x494]
mov ecx, esi
push eax
call fcn.004a24b0
push eax
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 6
call fcn.004a25e0
mov ecx, dword [ebp - 0x494]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x46b654
call fcn.004a2a20
mov ecx, dword [ebp - 0x48c]
mov byte [ebp - 4], 8
test ecx, ecx
je 0x46b667
call fcn.004a2a20
mov ecx, dword [ebp - 0x498]
mov byte [ebp - 4], 9
test ecx, ecx
je 0x46b67a
call fcn.004a2a20
mov ecx, dword [ebp - 0x490]
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x46b68d
call fcn.004a2a20
mov ecx, dword [ebp - 0x488]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x46b6a0
call fcn.004a2a20
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0
push 0x2e
push eax
call fcn.004ab2c0
xor ecx, ecx
push 0x4f3db4
push 0x104
mov word [eax], cx
lea eax, [ebp - 0x218]
push eax
call fcn.004bad7a
add esp, 0x14
test edi, edi
je 0x46b74d
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x4f3dc4
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.004ab2c0
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.004bad7a
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004ba210
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.0041ed10
add esp, 0x28
test al, al
jne 0x46b74d
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46b85e
lea ecx, [ebp - 0x424]
call fcn.004a2380
mov ecx, eax
mov dword [ebp - 0x46c], 0
mov edx, 0x4f3030
mov dword [ebp - 0x44c], 0
test bl, bl
mov dword [ebp - 0x484], 0x3c
mov eax, 0x4f3d2c
mov dword [ebp - 0x480], 0x40
cmove eax, edx
mov dword [ebp - 0x47c], 0
mov dword [ebp - 0x478], eax
xorps xmm0, xmm0
mov eax, dword [ebp - 0x49c]
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x474], eax
lea eax, [ebp - 0x484]
push eax
movlpd qword [ebp - 0x464], xmm0
movlpd qword [ebp - 0x45c], xmm0
movlpd qword [ebp - 0x454], xmm0
mov dword [ebp - 0x470], ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x46b7ef
mov bl, 1
jmp 0x46b831
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x46b7fe
mov bl, 1
jmp 0x46b84b
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
mov dword [ebp - 0x474], eax
lea eax, [ebp - 0x484]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
xor bl, bl
test eax, eax
je 0x46b84b
mov esi, dword [ebp - 0x44c]
test esi, esi
je 0x46b84b
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bh, bh
je 0x46b860
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x46b860
xor bl, bl
mov ecx, dword [ebp - 0x424]
mov dword [ebp - 4], 0xd
test ecx, ecx
je 0x46b876
call fcn.004a2a20
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.004a71aa
mov esp, ebp
pop ebp
ret