Function at 0x403920
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Get file attributes
Get file version info
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 4
push 0
push 2
mov dword [ebp - 0x808], edx
mov dword [ebp - 0x810], ecx
call fcn.00420d45
add esp, 4
push eax
call fcn.004230e7
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0x10
push pe_nt_image_headers32
push 0x46fec0
push 0x451c24
call ebx
mov edi, eax
cmp edi, 0x100
jb 0x4039a1
lea ecx, [edi*2 + 2]
push ecx
call fcn.00424b05
mov esi, eax
add esp, 4
test esi, esi
je 0x403e8c
push edi
push esi
push 0x451c24
call ebx
jmp 0x4039aa
test edi, edi
je 0x4039bf
mov esi, 0x46fec0
cmp word [esi], 0
je 0x4039bf
push 2
call fcn.00420d45
add esp, 4
mov dword [0x4560a8], eax
push 0x451c44
call fcn.00401220
push 0x451c74
call fcn.00401220
add esp, 8
push 0x4700c0
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x4039f5
push eax
push 0x451cb0
jmp 0x403a28
push 0xffffffffffffffff
push 0x451ce8
push 0x104
push 0x4700c0
call fcn.00421baa
add esp, 0x10
push 0x4700c0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x4700c0
cmp eax, 0xffffffff
jne 0x403a3a
push 0x451cf8
call fcn.00401220
add esp, 8
xor eax, eax
mov word [0x4700c0], ax
jmp 0x403a47
push 0x451d30
call fcn.00401220
add esp, 8
mov edi, 0x104
nop dword [eax]
lea ebx, [edi + edi]
push ebx
call fcn.00424b05
mov esi, eax
add esp, 4
test esi, esi
je 0x403e80
push edi
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x403ee9
cmp eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x403a96
call edi
cmp eax, 0x7a
jne 0x403a96
push esi
call fcn.00423169
add esp, 4
mov edi, ebx
jmp 0x403a50
lea eax, [ebp - 0x818]
push eax
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x818], eax
test eax, eax
jne 0x403b0b
call edi
push 0
push 0x400
lea ecx, [ebp - 0x804]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [ebp - 0x804]
push eax
push 0x451d80
call fcn.00401220
add esp, 8
mov ebx, dword [ebp - 0x814]
push esi
push 0x104
push 0x455ea0
call fcn.00421d98
add esp, 0xc
test eax, eax
jne 0x403e98
jmp 0x403bc7
push eax
call fcn.00424b05
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x403ae5
push ebx
push dword [ebp - 0x818]
push 0
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x403b55
call edi
push eax
push 0x451dc8
call fcn.00401220
add esp, 8
push ebx
call fcn.00423169
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x403aeb
lea eax, [ebp - 0x81c]
push eax
lea eax, [ebp - 0x814]
push eax
push 0x44fbec
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x403b9d
call edi
push eax
push 0x451e08
call fcn.00401220
add esp, 8
push ebx
call fcn.00423169
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x403aeb
mov ecx, dword [ebp - 0x814]
push ebx
mov eax, dword [ecx + 8]
mov dword [0x4702c8], eax
mov eax, dword [ecx + 0xc]
mov dword [0x4702cc], eax
call fcn.00423169
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x403aeb
push 0x5c
push 0x455ea0
call fcn.004053b7
add esp, 8
test eax, eax
jne 0x403be6
push 0x455ea0
push 0x451e78
jmp 0x403c1c
push 0x451ce8
xor ecx, ecx
push 0x104
push 0x455ea0
mov word [eax], cx
call fcn.00421e6e
add esp, 0xc
push 0x455ea0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x455ea0
cmp eax, 0xffffffff
jne 0x403c2e
push 0x451cf8
call fcn.00401220
add esp, 8
xor eax, eax
mov word [0x455ea0], ax
jmp 0x403c3b
push 0x451ef0
call fcn.00401220
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ecx, eax
movzx edx, word [ecx]
cmp edx, 0x22
jne 0x403c4e
add ecx, 2
xor eax, eax
cmp edx, 0x22
sete al
lea eax, [eax*2 + 0x20]
push eax
push ecx
call fcn.00405085
add esp, 8
test eax, eax
jne 0x403c72
mov edi, 0x4510e8
jmp 0x403c9e
lea edi, [eax + 2]
movzx eax, word [edi]
test ax, ax
je 0x403c9e
mov ecx, eax
nop
movzx eax, cx
push eax
call fcn.00424450
add esp, 4
test eax, eax
je 0x403c9e
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x403c80
push edi
push 0x451f40
call fcn.00401220
add esp, 8
push 0
push 0x451f80
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [ebp - 0x810]
cmp eax, 1
jle 0x403e55
mov esi, dword [ebp - 0x808]
mov esi, dword [esi + 4]
cmp eax, 2
jne 0x403d1b
push eax
push 0x451fa8
push esi
call fcn.00424acb
add esp, 0xc
test eax, eax
je 0x403cfd
push 6
push 0x451fb0
push esi
call fcn.00424acb
add esp, 0xc
test eax, eax
jne 0x403d1b
mov ecx, dword [ebp - 0x808]
call fcn.004036c0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403ff2
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x403d7f
cmp word [esi], 0x2d
jne 0x403d7f
lea ebx, [esi + 2]
mov ecx, ebx
call fcn.00402c40
test eax, eax
je 0x403d7f
xor edx, edx
mov ecx, ebx
call fcn.00402000
mov dword [ebp - 0x80c], eax
test eax, eax
je 0x403ea4
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403d50
sub esi, ecx
sar esi, 1
lea ecx, [edi + esi*2]
call fcn.004011e0
mov edi, eax
mov eax, dword [ebp - 0x80c]
lea ecx, [eax + 0x14]
test ecx, ecx
jne 0x403ed5
jmp 0x403e6a
mov ecx, 1
mov eax, dword [ebp - 0x808]
lea ebx, [eax + ecx*4]
mov eax, dword [ebx]
cmp word [eax], 0x2d
jne 0x403da2
mov eax, dword [ebp - 0x810]
inc ecx
cmp ecx, eax
jl 0x403d84
jmp 0x403dd9
cmp word [0x455ea0], 0
je 0x403db6
mov ecx, 0x455ea0
call fcn.00402800
cmp word [0x4700c0], 0
je 0x403dca
mov ecx, 0x4700c0
call fcn.00402800
mov edx, edi
mov ecx, ebx
call fcn.00402e80
mov eax, dword [ebp - 0x810]
cmp eax, 2
jne 0x403e55
push 0x452088
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
je 0x403e02
push 0x452090
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
jne 0x403e0d
mov ecx, dword [ebp - 0x808]
call fcn.004034c0
push 0x451fa8
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
je 0x403e6a
push 0x451fb0
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
je 0x403e6a
push 0x451b00
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
je 0x403e6a
push 0x451b08
push esi
call fcn.00420ee4
add esp, 8
test eax, eax
je 0x403e6a
xor edx, edx
mov ecx, 0x4510e8
call fcn.00402000
test eax, eax
je 0x403edd
jmp 0x403d6f
mov ecx, dword [ebp - 4]
mov eax, 0x67
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403ff2
mov esp, ebp
pop ebp
ret
push 0x451bd4
push 0x68
call fcn.00401270
push 0x44fba0
push 0x68
call fcn.00401270
push 0x451e3c
push 0x68
call fcn.00401270
push ebx
push 0x451fc0
push 1
call fcn.00420d45
add esp, 4
push eax
call fcn.00401090
mov ecx, dword [ebp - 0x808]
add esp, 0xc
call fcn.004036c0
push ebx
push 0x451ff0
push 0x67
call fcn.00401270
push edi
xor edx, edx
call fcn.00402390
push 0x4520a0
push 0x67
call fcn.00401270
push esi
call fcn.00423169
add esp, 4
push 0x451bf0
push 0
call fcn.00401270
int3