Function at 0x402c80
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x40b256
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x698
push ebx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0xc], ebx
push str.upgres.dll
mov dword [esp + 0x6b0], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [esp + 0xc], eax
jne 0x402cc9
push str.upgres.dll_could_not_be_loaded__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov eax, dword [esp + 0x10]
mov ecx, eax
and ecx, 0x80000001
jns 0x402cf0
dec ecx
or ecx, 0xfffffffe
inc ecx
cmp ecx, 1
jne 0x402fcf
cmp eax, 2
jl 0x402fcf
mov edx, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x410c88
push edx
call edi
test eax, eax
je 0x402fcb
mov eax, dword [esi + 4]
push 0x410c80
push eax
call edi
test eax, eax
je 0x402fcb
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.00402960
add esp, 8
test eax, eax
jne 0x402d5f
mov edx, dword [esp + 0x10]
push edx
push esi
call fcn.00402b60
mov eax, dword [esp + 0x14]
add esp, 8
cmp eax, ebx
je 0x402fe8
jmp 0x402fe1
mov eax, dword [0x414364]
sub eax, ebx
je 0x402d86
dec eax
je 0x402d7a
dec eax
jne 0x402d96
lea eax, [esp + 0x14]
push 0x410c78
push eax
jmp 0x402d90
lea ecx, [esp + 0x14]
push 0x410c70
push ecx
jmp 0x402d90
lea edx, [esp + 0x14]
push str.Mixed
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x402dd3
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 0x80
push 0x844
push ecx
call fcn.00401b70
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x402df9
push 0x100
push 8
call edi
push eax
call ebp
mov esi, eax
test esi, esi
je 0x402e11
lea edx, [esp + 0x18]
push edx
push str.Running_with_Quoted_Identifiers___s_r_n
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
push 0x410cb0
call fcn.004031d6
add esp, 8
push esi
push 0
call edi
push eax
call ebx
xor esi, esi
mov eax, dword [0x4109ac]
sub eax, 0
je 0x402e39
dec eax
je 0x402e2d
dec eax
jne 0x402e49
lea eax, [esp + 0x18]
push str.UNICODE
push eax
jmp 0x402e43
lea ecx, [esp + 0x18]
push 0x410bfc
push ecx
jmp 0x402e43
lea edx, [esp + 0x18]
push str.ANSI
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402e6f
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 0x80
push 0x845
push ecx
call fcn.00401b70
add esp, 0x10
mov esi, eax
test esi, esi
jne 0x402e99
push 0x100
push 8
call edi
push eax
call ebp
mov esi, eax
test esi, esi
je 0x402eaf
lea edx, [esp + 0x18]
push edx
push str.Reading_script_file_as__s_r_n
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
push 0x410cb0
call fcn.004031d6
add esp, 8
push esi
push 0
call edi
push eax
call ebx
mov eax, dword [0x4109ac]
mov ecx, dword [0x414364]
push eax
push ecx
lea ecx, [esp + 0x60]
call fcn.00401050
mov eax, dword [0x4109a8]
mov edx, dword [0x414360]
push 0x413b66
push 0x413968
push eax
push 0x41376a
lea ecx, [esp + 0x68]
mov byte [esp + 0x6c0], 1
mov dword [esp + 0x6b4], edx
call fcn.004013b0
test eax, eax
pop ebp
je 0x402f77
cmp word [0x413d64], 0
je 0x402f54
push str.Running_execute_argument..._r_n
push 0x410cb0
call fcn.004031d6
add esp, 8
lea ecx, [esp + 0x54]
push 0x413d64
call fcn.00402200
test eax, eax
jne 0x402f54
lea ecx, [esp + 0x54]
mov byte [esp + 0x6ac], al
call fcn.00401240
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402f4a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 2
jmp 0x402fed
mov ax, word [0x413f62]
lea ecx, [esp + 0x54]
neg ax
sbb eax, eax
and eax, 0x413f62
push eax
push 0x41356c
call fcn.00401530
test eax, eax
jne 0x402f9e
lea ecx, [esp + 0x54]
mov byte [esp + 0x6ac], 0
call fcn.00401240
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402f97
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
jmp 0x402fed
lea ecx, [esp + 0x54]
call fcn.004024e0
lea ecx, [esp + 0x54]
mov byte [esp + 0x6ac], 0
call fcn.00401240
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402fc7
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x402fed
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.00402b60
mov eax, dword [esp + 0x14]
add esp, 8
cmp eax, ebx
je 0x402fe8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0xffff
mov ecx, dword [esp + 0x6a4]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x6a4
ret