Function at 0x401ab0
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get file attributes
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x494
mov eax, dword [0x410024]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x427]
push ebx
push eax
mov byte [ebp - 0x428], bl
call fcn.00404d00
push 0x103
lea ecx, [ebp - 0x31f]
push ebx
push ecx
mov byte [ebp - 0x320], bl
call fcn.00404d00
add esp, 0x18
push 0x104
lea edx, [ebp - 0x320]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x320]
push 0x2f5c
push eax
call fcn.00402e80
lea ecx, [ebp - 0x320]
sub eax, ecx
inc eax
push eax
mov edx, ecx
push edx
lea eax, [ebp - 0x428]
push 0x104
push eax
call fcn.00402e05
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x18
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x430], ebx
inc dword [ebp - 0x438]
add dword [ebp - 0x430], 0x1388
push 0x104
lea ecx, [ebp - 0x218]
push ebx
push ecx
call fcn.00404d00
lea edx, [ebp - 0x428]
push edx
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00402da6
mov ecx, dword [0x411b6c]
push ecx
lea edx, [ebp - 0x218]
push 0x104
push edx
call fcn.00402d1b
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x24
lea eax, [ebp - 0x218]
push eax
call esi
cmp eax, 0xffffffff
je 0x401bc3
test al, 0x10
je 0x401c59
push 0x103
lea ecx, [ebp - 0x10f]
push ebx
push ecx
mov byte [ebp - 0x110], bl
call fcn.00404d00
add esp, 0xc
push ebx
push 0x23
lea edx, [ebp - 0x110]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x110]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401bf8
sub eax, edx
cmp byte [ebp + eax - 0x111], 0x5c
je 0x401c24
push 0x40e2f8
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.00402d1b
add esp, 0xc
mov ecx, dword [0x411b74]
push ecx
lea edx, [ebp - 0x110]
push 0x104
push edx
call fcn.00402d1b
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x218]
call section..text
add esp, 0x10
test al, al
je 0x401ede
push 0x104
lea ecx, [ebp - 0x218]
push ebx
push ecx
call fcn.00404d00
lea edx, [ebp - 0x428]
push edx
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00402da6
mov ecx, dword [ebp - 0x438]
add esp, 0x18
and ecx, 0x80000001
jns 0x401c99
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x401cb0
mov edx, dword [0x411b68]
push edx
push 0x104
lea eax, [ebp - 0x218]
push eax
jmp 0x401cc3
mov ecx, dword [0x411b78]
push ecx
push 0x104
lea edx, [ebp - 0x218]
push edx
call fcn.00402d1b
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call esi
cmp eax, 0xffffffff
je 0x401ec5
test al, 0x10
jne 0x401ec5
push 0x103
lea ecx, [ebp - 0x10f]
push ebx
push ecx
mov byte [ebp - 0x110], bl
call fcn.00404d00
add esp, 0xc
lea edx, [ebp - 0x42c]
push edx
lea eax, [ebp - 0x110]
push eax
mov dword [ebp - 0x42c], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea ecx, [ebp - 0x110]
push str.system
push ecx
call fcn.00402b01
add esp, 8
test eax, eax
jne 0x401e70
lea edx, [ebp - 0x42c]
push edx
mov dword [ebp - 0x42c], ebx
call fcn.00401970
add esp, 4
test al, al
je 0x401ede
mov eax, dword [ebp - 0x42c]
push 1
push eax
lea ecx, [ebp - 0x434]
push ecx
mov dword [ebp - 0x434], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x401ef1
push 0x44
lea edx, [ebp - 0x490]
push ebx
push edx
call fcn.00404d00
xor eax, eax
push 0xc7
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x444], eax
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x43c], eax
lea eax, [ebp - 0xd7]
push ebx
push eax
mov dword [ebp - 0x490], 0x44
mov byte [ebp - 0xd8], bl
call fcn.00404d00
mov ecx, dword [0x411b70]
push ecx
lea edx, [ebp - 0x218]
push edx
push str.cmd.exe__c__s__s
lea eax, [ebp - 0xd8]
push 0xc8
push eax
call fcn.00402d88
mov eax, dword [ebp - 0x434]
add esp, 0x2c
lea ecx, [ebp - 0x448]
push ecx
lea edx, [ebp - 0x490]
push edx
mov edx, dword [ebp - 0x42c]
push ebx
push eax
push 0x8000420
push ebx
push ebx
push ebx
lea ecx, [ebp - 0xd8]
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov esi, eax
mov eax, dword [ebp - 0x434]
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov ecx, dword [ebp - 0x42c]
push ecx
call edi
cmp esi, ebx
je 0x401ec5
mov ecx, dword [ebp - 0x444]
push ecx
call edi
mov edx, dword [ebp - 0x448]
push edx
call edi
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402921
mov esp, ebp
pop ebp
ret
push 0x38
lea edx, [ebp - 0x484]
push ebx
push edx
call fcn.00404d00
mov ecx, dword [0x411b70]
add esp, 0xc
lea edx, [ebp - 0x488]
lea eax, [ebp - 0x218]
push edx
mov dword [ebp - 0x488], 0x3c
mov dword [ebp - 0x478], eax
mov dword [ebp - 0x474], ecx
mov dword [ebp - 0x47c], str.open
mov dword [ebp - 0x46c], ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x401e5d
mov esi, dword [ebp - 0x430]
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x61a8
jle 0x401b52
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402921
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x42c]
push eax
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.00402921
mov esp, ebp
pop ebp
ret