Function at 0x45b240
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a8fb0
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x4cfc64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x10], ebx
test byte [0x4d4bd8], 1
jne 0x45b3d7
or dword [0x4d4bd8], 1
mov dword [ebp - 4], ebx
call fcn.00480035
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x45b29e
push 0x80004005
call fcn.00420000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [0x4d4bd4], eax
mov ecx, 0x4b263c
mov byte [ebp - 4], 1
test ecx, 0xffff0000
jne 0x45b3a6
mov edx, ecx
movzx esi, dx
push esi
call fcn.00487f55
mov edi, eax
cmp edi, ebx
je 0x45b3c3
mov eax, esi
shr eax, 4
inc eax
movzx ecx, ax
push 6
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, ebx
je 0x45b3c3
push esi
push eax
push edi
call fcn.0042066d
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x45b3c3
mov edx, dword [0x4d4bd4]
movzx edi, word [esi]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, edi
or eax, ecx
jge 0x45b334
push edi
mov ecx, 0x4d4bd4
call fcn.004204f5
mov edx, dword [0x4d4bd4]
movzx eax, word [esi]
add esi, 2
mov dword [ebp - 0x10], edx
cmp eax, 0xffffffff
jne 0x45b34c
push esi
call fcn.0048e8dc
add esp, 4
inc eax
lea edx, [eax + eax]
mov eax, dword [ebp - 0x10]
push edx
push esi
lea ebx, [edi + edi]
push ebx
push eax
call fcn.0048e0d0
add esp, 0x10
cmp eax, 0x50
ja case.0x45b36d.1
movzx ecx, byte [eax + 0x45b528]
jmp dword [ecx*4 + 0x45b518]
call fcn.0048059d
call fcn.004805d5
test edi, edi
jl 0x45b39c
mov eax, dword [0x4d4bd4]
cmp edi, dword [eax - 8]
jg 0x45b39c
mov dword [eax - 0xc], edi
mov eax, dword [0x4d4bd4]
xor edx, edx
mov word [ebx + eax], dx
jmp 0x45b3c3
push 0x80070057
call fcn.00420000
push 0x4b263c
call fcn.0048e8dc
add esp, 4
push eax
push 0x4b263c
mov ecx, 0x4d4bd4
call fcn.00421168
push 0x4acc60
call fcn.0048f585
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x4d4bd4]
cmp dword [ecx - 0xc], 0
jne 0x45b4ed
mov edx, dword [ecx - 8]
mov eax, 1
sub eax, dword [ecx - 4]
sub edx, 0x514
or eax, edx
jge 0x45b411
push 0x514
mov ecx, 0x4d4bd4
call fcn.004204f5
mov ecx, dword [0x4d4bd4]
push 0x514
push ecx
push str._USERPROFILE_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
mov eax, dword [0x4d4bd4]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0048f15d
add esp, 8
test eax, eax
jl 0x45b39c
mov ecx, dword [0x4d4bd4]
cmp eax, dword [ecx - 8]
jg 0x45b39c
mov dword [ecx - 0xc], eax
mov edx, dword [0x4d4bd4]
xor ecx, ecx
mov word [edx + eax*2], cx
test esi, esi
jbe 0x45b493
mov eax, dword [0x4d4bd4]
cmp dword [eax - 0xc], ecx
jle 0x45b493
push 0x7e
push eax
call fcn.0048ed5b
add esp, 8
test eax, eax
je 0x45b493
sub eax, dword [0x4d4bd4]
sar eax, 1
cmp eax, 0xffffffff
je 0x45b493
push 0x4d4bd4
call fcn.00458450
add esp, 4
mov eax, dword [0x4d4bd4]
push eax
lea ecx, [ebp - 0x10]
push str.ReplaceUserProfile:_CurProfile_s
push ecx
call fcn.004559f0
add esp, 0xc
mov dword [ebp - 4], 2
mov eax, dword [eax]
push eax
push str.DynamicPaths_Initialize
call fcn.00453960
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45b4e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [0x4d4bd4]
add ecx, 0xfffffff0
push ecx
call fcn.00421e21
mov ecx, eax
mov eax, dword [ebp + 8]
add esp, 4
add ecx, 0x10
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret