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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov edx, 2
lock inc word [edx*2 + 0x49b438]
je 0x484b3e
push edx
call fcn.0047ba58
add esp, 4
cmp dword [ebp + 8], 0
je 0x484da8
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, 0x3d
mov dword [ebp - 4], ecx
push ecx
push eax
call fcn.004839f8
mov dword [ebp - 0x30], eax
add esp, 8
test eax, eax
je 0x484da8
cmp dword [0x495d94], 0
jne 0x484b98
push 4
call fcn.00472fc4
mov dword [0x495d94], eax
add esp, 4
test eax, eax
je 0x484da8
mov dword [eax], 0
mov eax, dword [ebp - 0x30]
mov cl, byte [eax + 1]
neg cl
sbb ecx, ecx
inc ecx
mov byte [ebp - 0x24], cl
sub eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
push eax
push dword [ebp + 8]
call fcn.00484acc
mov dword [ebp - 0x14], eax
add esp, 8
test eax, eax
jle 0x484c78
cmp byte [ebp - 0x24], 0
jne 0x484c09
mov ecx, dword [0x495d94]
mov eax, dword [ecx + eax*4 - 4]
mov dword [ebp - 0x20], eax
push dword [ebp + 8]
call fcn.004724a8
mov dword [ebp - 0x1c], eax
add esp, 4
test eax, eax
je 0x484da8
mov ecx, dword [ebp - 0x14]
mov edx, dword [0x495d94]
mov dword [edx + ecx*4 - 4], eax
push dword [ebp - 0x20]
call fcn.00472694
add esp, 4
jmp 0x484ce1
call fcn.00484a9c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x495d94]
mov eax, dword [ecx + eax*4 - 4]
mov dword [ebp - 0x20], eax
push eax
call fcn.00472694
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x495d94]
lea eax, [ecx + eax*4 - 4]
mov dword [ebp - 0x28], eax
add esp, 4
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0
je 0x484c4d
mov ecx, dword [eax + 4]
mov dword [eax], ecx
add dword [ebp - 0x28], 4
jmp 0x484c3a
mov eax, dword [ebp - 0x10]
lea eax, [eax*4 - 4]
push eax
push dword [0x495d94]
call fcn.004768f8
mov dword [ebp - 0x2c], eax
add esp, 8
test eax, eax
je 0x484da8
mov dword [0x495d94], eax
jmp 0x484ce1
cmp byte [ebp - 0x24], 0
jne 0x484ce1
mov eax, 1
sub eax, dword [ebp - 0x14]
shl eax, 2
push eax
push dword [0x495d94]
call fcn.004768f8
mov dword [ebp - 0x2c], eax
add esp, 8
test eax, eax
je 0x484da8
mov dword [0x495d94], eax
push dword [ebp + 8]
call fcn.004724a8
mov dword [ebp - 0x1c], eax
add esp, 4
test eax, eax
je 0x484da8
mov ecx, 0xffffffff
sub ecx, dword [ebp - 0x14]
mov edx, dword [0x495d94]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x14]
neg eax
mov ecx, dword [0x495d94]
mov dword [ecx + eax*4], 0
mov eax, dword [ebp - 0x18]
inc eax
push eax
call fcn.00472fc4
mov dword [ebp - 0x34], eax
add esp, 4
test eax, eax
je 0x484da8
push dword [ebp - 0x18]
push dword [ebp + 8]
push eax
call fcn.00471320
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x18]
mov byte [eax + ecx], 0
inc dword [ebp - 0x30]
cmp byte [ebp - 0x24], 0
mov eax, 0
jne 0x484d20
mov eax, dword [ebp - 0x30]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableA]
push dword [ebp - 0x34]
call fcn.00472694
add esp, 0x10
cmp dword [0x4958cd], 0
je 0x484d4a
push dword [0x4958cd]
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStrings]
mov dword [0x4958cd], eax
push dword [ebp + 8]
call fcn.00484a3c
add esp, 4
test eax, eax
jne 0x484da8
cmp dword [0x4958d1], 0
je 0x484d85
push dword [0x4958d1]
call fcn.00472694
mov dword [0x4958d1], 0
add esp, 4
mov edx, 2
lock dec word [edx*2 + 0x49b438]
js 0x484d9e
push edx
call fcn.0047bad4
add esp, 4
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xc], 0xffffffff
jmp 0x484d85