Function at 0x401000
Capabilities:
Accept command line arguments
Check if file exists
Get session user name

Disassembly:
sub esp, 0x994
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push eax
call dword [0x41712c]
push eax
call dword [0x4171a8]
mov ebp, eax
test ebp, ebp
je 0x4012be
cmp dword [esp + 0x10], 3
jne 0x4012be
mov ecx, dword [ebp + 4]
push ecx
call dword [0x4171b0]
test eax, eax
jne 0x40104f
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x994
ret
mov esi, dword [ebp + 8]
mov edx, dword [0x41a050]
push ecx
mov edi, esp
test esi, esi
mov dword [edi], edx
je 0x4010ac
mov eax, esi
shr eax, 0x10
jne 0x401078
and esi, 0xffff
mov ecx, edi
push esi
call fcn.004035b0
jmp 0x4010ac
push esi
call dword [0x4170cc]
mov ebx, eax
test ebx, ebx
je 0x4010ac
push ebx
mov ecx, edi
call fcn.00403980
test eax, eax
je 0x4010ac
lea ecx, [ebx + ebx]
lea edx, [ebx + ebx + 2]
cmp edx, ecx
jb 0x4010ac
mov edi, dword [edi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 4]
push ecx
mov ecx, esp
push edx
call fcn.00403360
lea ecx, [esp + 0x598]
call fcn.00406660
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x5a]
mov word [esp + 0x58], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x58]
push eax
push ecx
mov dword [esp + 0x1c], 0x104
call dword [0x41700c]
cmp word [esp + 0x58], 0
je 0x40125d
lea edx, [esp + 0x58]
push str.SYSTEM
push edx
call fcn.0040ccdb
add esp, 8
test eax, eax
je 0x40125d
push 0
lea ecx, [esp + 0x264]
call fcn.00401340
mov eax, dword [esp + 0x37c]
test eax, eax
je 0x401142
lea ecx, [esp + 0x590]
call fcn.00406a20
jmp 0x401202
mov edi, dword [ebp + 8]
mov eax, dword [0x41a050]
push ecx
mov ebx, esp
test edi, edi
mov dword [ebx], eax
je 0x4011b3
mov ecx, edi
shr ecx, 0x10
jne 0x40116a
and edi, 0xffff
mov ecx, ebx
push edi
call fcn.004035b0
jmp 0x4011b3
push edi
call dword [0x4170cc]
mov esi, eax
test esi, esi
je 0x4011b3
lea edx, [esi + esi + 0xe]
push edx
call fcn.0040cccd
add esp, 4
test eax, eax
je 0x4011b3
mov dword [eax], 1
lea ecx, [esi + esi]
mov word [eax + esi*2 + 0xc], 0
mov dword [eax + 4], esi
mov dword [eax + 8], esi
push ecx
lea edx, [esi + esi + 2]
add eax, 0xc
push edi
push edx
push eax
mov dword [ebx], eax
call fcn.00401310
add esp, 0x10
lea eax, [esp + 0x594]
lea ecx, [esp + 0x1c]
push eax
call fcn.00403e40
call dword [0x4171f4]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push 0x41ebb8
mov esi, eax
call fcn.004012d0
mov eax, dword [0x41ebc0]
push 0
push 0x403d90
push esi
push 0xc8
push eax
call dword [0x4171f8]
lea ecx, [esp + 0x18]
call fcn.004040b0
mov eax, dword [esp + 0x318]
mov edx, dword [0x41a054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401237
add eax, 0xfffffff4
push eax
call dword [0x417130]
test eax, eax
jg 0x401237
mov edx, dword [esp + 0x318]
add edx, 0xfffffff4
push edx
call fcn.0040ccc2
add esp, 4
lea ecx, [esp + 0x314]
call fcn.00403950
lea ecx, [esp + 0x310]
call fcn.00403950
lea ecx, [esp + 0x30c]
call fcn.00403950
jmp 0x401269
lea ecx, [esp + 0x590]
call fcn.00406a20
push ebp
call dword [0x417134]
mov eax, dword [esp + 0x59c]
mov edx, dword [0x41a054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4012a5
add eax, 0xfffffff4
push eax
call dword [0x417130]
test eax, eax
jg 0x4012a5
mov edx, dword [esp + 0x59c]
add edx, 0xfffffff4
push edx
call fcn.0040ccc2
add esp, 4
lea ecx, [esp + 0x598]
call fcn.00403950
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x994
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x994
ret