Function at 0x408600
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x60cc9f
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x711ab8]
xor eax, esp
mov dword [esp + 0x248], eax
push ebx
push esi
push edi
mov eax, dword [0x711ab8]
xor eax, esp
push eax
lea eax, [esp + 0x260]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
cmp dword [esi + 0x18], 8
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], edx
mov byte [esp + 0x13], 0
lea ebx, [esi + 4]
jb 0x408664
mov eax, dword [ebx]
jmp 0x408666
mov eax, ebx
push 0x104
push eax
lea eax, [esp + 0x54]
push eax
call fcn.005c41c6
mov edi, dword [sym.imp.USER32.dll_CharLowerW]
add esp, 0xc
lea edx, [esp + 0x4c]
xor ecx, ecx
push edx
mov word [esp + 0x256], cx
call edi
push 0xb
lea eax, [esp + 0x50]
push str._systemroot
push eax
call fcn.005c48fa
add esp, 0xc
test eax, eax
jne 0x40880f
push 0x104
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ebx, ebx
cmp eax, ebx
je 0x408b72
lea eax, [esp + 0x4c]
xor edx, edx
push eax
mov word [esp + 0x256], dx
call edi
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x28]
push edx
lea ecx, [eax - 0xb]
push esi
lea edx, [ebx + 0xb]
call fcn.0040b680
mov dword [esp + 0x268], ebx
mov edi, 8
cmp dword [eax + 0x18], edi
jb 0x408701
mov eax, dword [eax + 4]
jmp 0x408704
add eax, 4
push eax
lea eax, [esp + 0x50]
push 0x104
push eax
call fcn.005c487d
or esi, 0xffffffff
add esp, 0xc
mov dword [esp + 0x268], esi
cmp dword [esp + 0x40], edi
jb 0x408734
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.005c396f
add esp, 4
xor edx, edx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], ebx
mov word [esp + 0x2c], dx
call fcn.00406350
test al, al
je 0x408b72
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x50]
call fcn.0040b990
mov dword [esp + 0x268], 1
lea edi, [esp + 0x14]
call fcn.0040bd70
lea ecx, [esp + 0x28]
push ecx
call fcn.00407000
mov bl, 2
mov byte [esp + 0x268], bl
mov eax, edi
lea edi, [esp + 0x28]
call fcn.0040ddb0
mov edx, dword [esp + 0x18]
push edx
lea edi, [esp + 0x30]
call fcn.0040bfe0
mov edi, dword [esp + 0x24]
test edi, edi
je 0x4087b7
lea eax, [esp + 0x28]
call fcn.0040ddb0
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x3c], esp
push eax
lea edi, [esp + 0x48]
call fcn.004070c0
mov byte [esp + 0x284], 3
mov byte [esp + 0x284], bl
mov ecx, dword [esp + 0x38]
call fcn.0040aa10
add esp, 0x1c
mov byte [esp + 0x13], 1
mov byte [esp + 0x268], 1
mov ecx, edi
push ecx
call fcn.00407060
mov dword [esp + 0x268], esi
lea ecx, [esp + 0x14]
call fcn.0040ba40
jmp 0x408b72
push 8
lea edx, [esp + 0x50]
push str.system32
push edx
call fcn.005c48fa
add esp, 0xc
test eax, eax
jne 0x408932
push 0x104
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x408b72
lea edx, [esp + 0x4c]
xor ecx, ecx
push edx
mov word [esp + 0x256], cx
call edi
push 0x6ca140
lea eax, [esp + 0x50]
push 0x104
push eax
call fcn.005c487d
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x408873
mov ebx, dword [ebx]
push ebx
lea ecx, [esp + 0x50]
push 0x104
push ecx
call fcn.005c487d
add esp, 0xc
lea ecx, [esp + 0x4c]
call fcn.00406350
test al, al
je 0x408b72
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x50]
call fcn.0040b990
mov dword [esp + 0x268], 4
lea eax, [esp + 0x28]
push eax
call fcn.00407000
mov bl, 5
mov byte [esp + 0x268], bl
lea eax, [esp + 0x14]
lea edi, [esp + 0x28]
call fcn.0040ddb0
mov ecx, dword [esp + 0x18]
push ecx
lea edi, [esp + 0x30]
call fcn.0040bfe0
mov edi, dword [esp + 0x24]
test edi, edi
je 0x4088ef
lea eax, [esp + 0x28]
call fcn.0040ddb0
sub esp, 0x1c
mov edx, esp
mov dword [esp + 0x3c], esp
push edx
lea edi, [esp + 0x48]
call fcn.004070c0
mov byte [esp + 0x284], 6
mov byte [esp + 0x284], bl
mov ecx, dword [esp + 0x38]
call fcn.0040aa10
add esp, 0x1c
mov byte [esp + 0x13], 1
mov byte [esp + 0x268], 4
mov eax, edi
push eax
jmp 0x408a0b
push 0x13
push 0
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.SHELL32.dll_PathResolve]
test eax, eax
je 0x408a29
push 0x104
lea edx, [esp + 0x50]
push edx
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x408b72
lea ecx, [esp + 0x4c]
call fcn.00406350
test al, al
je 0x408b72
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x50]
call fcn.0040b990
mov ebx, 7
mov dword [esp + 0x268], ebx
lea edx, [esp + 0x28]
push edx
call fcn.00407000
mov byte [esp + 0x268], 8
lea eax, [esp + 0x14]
lea edi, [esp + 0x28]
call fcn.0040ddb0
mov eax, dword [esp + 0x18]
push eax
lea edi, [esp + 0x30]
call fcn.0040bfe0
mov edi, dword [esp + 0x24]
test edi, edi
je 0x4089cd
lea eax, [esp + 0x28]
call fcn.0040ddb0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push ecx
lea edi, [esp + 0x48]
call fcn.004070c0
mov byte [esp + 0x284], 9
mov byte [esp + 0x284], 8
mov ecx, dword [esp + 0x38]
call fcn.0040aa10
add esp, 0x1c
mov byte [esp + 0x13], 1
mov byte [esp + 0x268], bl
mov edx, edi
push edx
call fcn.00407060
mov dword [esp + 0x268], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.0040ba40
jmp 0x408b72
cmp dword [esi + 0x18], 8
jb 0x408a31
mov ebx, dword [ebx]
lea eax, [esp + 0x44]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
mov dword [esp + 0x20], edi
test edi, edi
je 0x408b72
xor esi, esi
cmp dword [esp + 0x44], esi
jle 0x408b72
lea ebx, [esi + 0xa]
lea ebx, [ebx]
mov ecx, dword [edi + esi*4]
push 0x104
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.005c41c6
add esp, 0xc
push 0x13
push 0
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.SHELL32.dll_PathResolve]
test eax, eax
je 0x408b67
push 0x104
lea ecx, [esp + 0x50]
push ecx
mov edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x408b67
lea ecx, [esp + 0x4c]
call fcn.00406350
test al, al
je 0x408b67
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x50]
call fcn.0040b990
mov dword [esp + 0x268], ebx
lea ecx, [esp + 0x28]
push ecx
call fcn.00407000
mov byte [esp + 0x268], 0xb
lea eax, [esp + 0x14]
lea edi, [esp + 0x28]
call fcn.0040ddb0
mov edx, dword [esp + 0x18]
push edx
lea edi, [esp + 0x30]
call fcn.0040bfe0
mov edi, dword [esp + 0x24]
test edi, edi
je 0x408b0c
lea eax, [esp + 0x28]
call fcn.0040ddb0
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x64], esp
push eax
lea edi, [esp + 0x48]
call fcn.004070c0
mov byte [esp + 0x284], 0xc
mov byte [esp + 0x284], 0xb
mov ecx, dword [esp + 0x38]
call fcn.0040aa10
add esp, 0x1c
mov byte [esp + 0x13], 1
mov byte [esp + 0x268], bl
mov ecx, edi
push ecx
call fcn.00407060
mov dword [esp + 0x268], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.0040ba40
mov edi, dword [esp + 0x20]
inc esi
cmp esi, dword [esp + 0x44]
jl 0x408a60
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x260]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret