Function at 0x474830
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4f85d0
push eax
mov eax, 0x1050
mov dword fs:[0], esp
call fcn.004a68d0
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x20]
call fcn.004e6bcc
xor ebp, ebp
or edi, 0xffffffff
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], ebp
mov dword [esp + 0x48], edi
call fcn.004c43e5
mov dword [esp + 0x20], vtable.CMB2CommandLineInfo.0
mov dword [esp + 0x44], edi
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
mov dword [esp + 0x106c], 1
call fcn.00474d80
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x1068], 2
cmp dword [ecx - 8], ebp
jne 0x474990
push str.KVStudio4Path
push str.SOFTWAREKEYENCEKVB
lea edx, [esp + 0x24]
push reloc.OLEAUT32.dll_SysReAllocString
push edx
mov ecx, esi
call fcn.00476850
mov eax, dword [esp + 0x1c]
mov bl, 3
mov byte [esp + 0x1068], bl
cmp dword [eax - 8], ebp
je 0x4748f5
lea ecx, [esp + 0x1c]
lea edi, [esi + 0xdc]
push ecx
mov ecx, edi
call fcn.004c66f3
jmp 0x47497d
mov eax, dword [esi + 0xd8]
dec eax
je 0x47493c
push str.KVSPath
push str.SOFTWAREKEYENCEKVB
lea edx, [esp + 0x20]
push reloc.OLEAUT32.dll_SysReAllocString
push edx
mov ecx, esi
call fcn.00476850
lea edi, [esi + 0xdc]
push eax
mov ecx, edi
mov byte [esp + 0x106c], 4
call fcn.004c66f3
mov byte [esp + 0x1068], bl
lea ecx, [esp + 0x18]
jmp 0x474978
push str.KVBPath
push str.SOFTWAREKEYENCEKVB
lea eax, [esp + 0x18]
push reloc.OLEAUT32.dll_SysReAllocString
push eax
mov ecx, esi
call fcn.00476850
lea edi, [esi + 0xdc]
push eax
mov ecx, edi
mov byte [esp + 0x106c], 5
call fcn.004c66f3
mov byte [esp + 0x1068], bl
lea ecx, [esp + 0x10]
call fcn.004c65ba
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1068], 2
call fcn.004c65ba
jmp 0x4749a2
lea ecx, [esp + 0x14]
lea edi, [esi + 0xdc]
push ecx
mov ecx, edi
call fcn.004c66f3
mov edx, dword [edi]
cmp dword [edx - 8], ebp
jne 0x474a91
mov eax, dword [esi + 0xd8]
dec eax
je 0x4749ef
push str.KVSPath
push str.SOFTWAREKEYENCEKVB
lea eax, [esp + 0x18]
push reloc.OLEAUT32.dll_SysReAllocString
push eax
mov ecx, esi
call fcn.00476850
push eax
mov ecx, edi
mov byte [esp + 0x106c], 6
call fcn.004c66f3
mov byte [esp + 0x1068], 2
lea ecx, [esp + 0x10]
jmp 0x474a26
push str.KVBPath
push str.SOFTWAREKEYENCEKVB
lea ecx, [esp + 0x20]
push reloc.OLEAUT32.dll_SysReAllocString
push ecx
mov ecx, esi
call fcn.00476850
push eax
mov ecx, edi
mov byte [esp + 0x106c], 7
call fcn.004c66f3
mov byte [esp + 0x1068], 2
lea ecx, [esp + 0x18]
call fcn.004c65ba
mov edx, dword [edi]
cmp dword [edx - 8], ebp
jne 0x474a91
mov esi, dword [esi + 0xd8]
push ebp
dec esi
push ebp
je 0x474a45
mov eax, dword [0x5ad684]
push eax
jmp 0x474a4c
mov ecx, dword [0x5ad67c]
push ecx
call fcn.004d47fc
lea ecx, [esp + 0x14]
mov byte [esp + 0x1068], 1
call fcn.004c65ba
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], 8
call fcn.004c4418
lea ecx, [esp + 0x20]
mov dword [esp + 0x1068], 0xffffffff
call fcn.004e6c27
xor eax, eax
jmp 0x474d58
lea edx, [esp + 0x10]
push 1
push edx
mov ecx, edi
call fcn.004bfb75
mov eax, dword [eax]
push 0x59d468
push eax
call fcn.004a629c
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
setne bl
call fcn.004c65ba
test bl, bl
je 0x474aca
push 0x5c
mov ecx, edi
call fcn.004c69bd
push str.KVComm.dll
mov ecx, esi
call fcn.004769b0
test eax, eax
jne 0x474b1a
lea ecx, [esp + 0x14]
mov byte [esp + 0x1068], 1
call fcn.004c65ba
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], 9
call fcn.004c4418
lea ecx, [esp + 0x20]
mov dword [esp + 0x1068], 0xffffffff
call fcn.004e6c27
xor eax, eax
jmp 0x474d58
mov eax, dword [edi]
mov dword [esi + 0xc8], ebp
mov ebp, dword [eax - 8]
call fcn.004e4e26
mov ebx, dword [eax + 8]
push ebp
push 0
mov ecx, edi
call fcn.004c69ea
lea ecx, [esp + 0x20]
push eax
push ecx
push ebx
call fcn.00499510
add esp, 0x10
lea edx, [esp + 0x18]
mov ecx, esi
mov dword [esi + 0xc8], eax
push edx
call fcn.00476ad0
mov eax, dword [eax]
lea ecx, [esp + 0x10]
mov bl, 0xa
push ecx
mov ebp, dword [eax - 8]
mov ecx, esi
mov byte [esp + 0x106c], bl
call fcn.00476ad0
mov eax, dword [eax]
push ebp
push eax
mov byte [esp + 0x1070], 0xb
call dword [0x5b3484]
lea ecx, [esp + 0x10]
mov byte [esp + 0x1068], bl
call fcn.004c65ba
lea ecx, [esp + 0x18]
mov byte [esp + 0x1068], 2
call fcn.004c65ba
push str.UE2UnitSetIO.dll
mov ecx, esi
call fcn.004769b0
test eax, eax
jne 0x474bf5
lea ecx, [esp + 0x14]
mov byte [esp + 0x1068], 1
call fcn.004c65ba
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], 0xc
call fcn.004c4418
lea ecx, [esp + 0x20]
mov dword [esp + 0x1068], 0xffffffff
call fcn.004e6c27
xor eax, eax
jmp 0x474d58
push str.GetMMCDir.dll
mov ecx, esi
call fcn.004769b0
test eax, eax
jne 0x474c45
lea ecx, [esp + 0x14]
mov byte [esp + 0x1068], 1
call fcn.004c65ba
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], 0xd
call fcn.004c4418
lea ecx, [esp + 0x20]
mov dword [esp + 0x1068], 0xffffffff
call fcn.004e6c27
xor eax, eax
jmp 0x474d58
lea edx, [esp + 0x60]
push 0x1000
push edx
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x60]
push 0x59e83c
push eax
call ebx
mov edi, dword [edi]
lea ecx, [esp + 0x60]
push edi
push ecx
call ebx
lea edx, [esp + 0x60]
push edx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call fcn.00476ad0
mov eax, dword [eax]
mov ecx, esi
push eax
push str.MBPath
push str.SOFTWAREKEYENCEKVB
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0x1078], 0xe
call fcn.00476940
lea ecx, [esp + 0x10]
mov byte [esp + 0x1068], 2
call fcn.004c65ba
call dword [0x5b3274]
push eax
call fcn.004a7595
fcomp qword [0x54b918]
add esp, 4
fnstsw ax
test ah, 1
jne 0x474ce7
mov eax, 1
jmp 0x474ce9
xor eax, eax
mov dword [esi + 0xe0], eax
call dword [0x5b3274]
push eax
call fcn.004a7595
fcomp qword [0x53cda0]
add esp, 4
fnstsw ax
test ah, 1
jne 0x474d12
mov eax, 1
jmp 0x474d14
xor eax, eax
lea ecx, [esp + 0x14]
mov dword [esi + 0xe4], eax
mov byte [esp + 0x1068], 1
call fcn.004c65ba
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1068], 0xf
call fcn.004c4418
lea ecx, [esp + 0x20]
mov dword [esp + 0x1068], 0xffffffff
call fcn.004e6c27
mov eax, 1
mov ecx, dword [esp + 0x1060]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x105c
ret