Function at 0x403720
Capabilities:
Accept command line arguments
Get common file path
Query environment variable

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40a332
push eax
mov dword fs:[0], esp
sub esp, 0x12c
lea eax, [esp + 0x2c]
push ebx
push ebp
push esi
push edi
push 0xfe
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
or ebx, 0xffffffff
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x40d7e4], ecx
inc ecx
push ecx
call fcn.004052bd
mov ebp, eax
lea edi, [esp + 0x40]
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7e0]
test eax, eax
je 0x4037a3
push eax
call fcn.004052b2
add esp, 4
lea eax, [esp + 0x3c]
push 0xfe
push eax
mov dword [0x40d7e0], ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x40d7c4], ecx
inc ecx
push ecx
call fcn.004052bd
mov ebp, eax
lea edi, [esp + 0x40]
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7c0]
test eax, eax
je 0x40380a
push eax
call fcn.004052b2
add esp, 4
lea eax, [esp + 0x3c]
push 0xfe
push eax
push str._TEMP_
mov dword [0x40d7c0], ebp
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x40d7b4], ecx
inc ecx
push ecx
call fcn.004052bd
mov ebp, eax
lea edi, [esp + 0x40]
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7b0]
test eax, eax
je 0x403876
push eax
call fcn.004052b2
add esp, 4
mov dword [0x40d7b0], ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov ecx, ebx
mov edi, esi
xor eax, eax
xor edx, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4038af
mov al, byte [edx + esi + 1]
inc edx
cmp al, 0x22
je 0x4038af
mov byte [esp + edx + 0x3b], al
mov edi, esi
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jb 0x403893
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
mov byte [esp + edx + 0x3b], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x40d7a4], ecx
inc ecx
push ecx
call fcn.004052bd
mov ebp, eax
lea edi, [esp + 0x40]
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7a0]
test eax, eax
je 0x403905
push eax
call fcn.004052b2
add esp, 4
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
mov dword [0x40d7a0], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, 0x5c
cmp byte [esp + ecx + 0x3c], al
je 0x40392d
test ecx, ecx
jbe 0x40392d
mov dl, byte [esp + ecx + 0x3b]
dec ecx
cmp dl, al
jne 0x403920
mov byte [esp + ecx + 0x3c], 0
lea edi, [esp + 0x3c]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x40d794], ecx
inc ecx
push ecx
call fcn.004052bd
mov ebp, eax
lea edi, [esp + 0x40]
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d790]
test eax, eax
je 0x403983
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [0x40d794]
mov dword [0x40d790], ebp
mov dword [0x40d7ec], eax
inc eax
push eax
call fcn.004052bd
mov edi, dword [0x40d790]
mov ebp, eax
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7e8]
test eax, eax
je 0x4039d3
push eax
call fcn.004052b2
add esp, 4
push 0x40d1ac
lea ecx, [esp + 0x14]
mov dword [0x40d7e8], ebp
call fcn.004021d0
push eax
mov ecx, 0x40d7e8
mov dword [esp + 0x148], 0
call fcn.004023f0
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x144], ebx
call fcn.00402490
push esi
mov ecx, 0x40d7e8
call fcn.00402300
push 0x40d1a8
lea ecx, [esp + 0x14]
call fcn.004021d0
push eax
mov ecx, 0x40d7e8
mov dword [esp + 0x148], 1
call fcn.004023f0
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x144], ebx
call fcn.00402490
push esi
mov ecx, 0x40d7e8
call fcn.00402300
mov eax, dword [0x40d7ec]
mov dword [0x40d7cc], eax
inc eax
push eax
call fcn.004052bd
mov edi, dword [0x40d7e8]
mov ebp, eax
mov ecx, ebx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d7c8]
xor edi, edi
cmp eax, edi
je 0x403aa7
push eax
call fcn.004052b2
add esp, 4
push str._svchost.exe
lea ecx, [esp + 0x14]
mov dword [0x40d7c8], ebp
call fcn.004021d0
push eax
mov ecx, 0x40d7c8
mov dword [esp + 0x148], 2
call fcn.004023f0
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x144], ebx
call fcn.00402490
push esi
mov ecx, 0x40d7c8
call fcn.00402300
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
push 0x40d194
lea ecx, [esp + 0x14]
mov dword [esp + 0x148], 3
call fcn.004021d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x144], 4
push ecx
push eax
push 0x40d7d8
push 0x80000002
call fcn.00401a60
add esp, 0x10
lea ecx, [esp + 0x10]
test al, al
sete bl
mov byte [esp + 0x144], 3
call fcn.00402490
pop edi
pop esi
pop ebp
test bl, bl
pop ebx
je 0x403bc4
push 0
call fcn.00405893
push eax
call fcn.0040586b
call fcn.00405875
lea edx, [esp + 0x20]
inc eax
push 0xa
push edx
push eax
mov dword [0x40d798], eax
call fcn.0040a066
add esp, 0x14
lea eax, [esp + 0x18]
lea ecx, [esp + 8]
push eax
call fcn.00402260
push 0x40d194
lea ecx, [esp + 0x14]
call fcn.004021d0
lea ecx, [esp + 8]
mov byte [esp + 0x134], 5
push ecx
push eax
push 0x40d7d8
push 0x80000002
call fcn.004019dc
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x134], 3
call fcn.00402490
jmp 0x403bd6
mov edx, dword [esp + 8]
push edx
call fcn.00405aa8
add esp, 4
mov dword [0x40d798], eax
lea ecx, [esp + 8]
mov dword [esp + 0x134], 0xffffffff
call fcn.00402490
mov ecx, dword [esp + 0x12c]
mov dword fs:[0], ecx
add esp, 0x138
ret