Function at 0x41c610
Capabilities:
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x48]
sub esp, 0x48
push 0xffffffffffffffff
push 0x47c850
mov eax, dword fs:[0]
push eax
sub esp, 0x1fc
push ebx
push esi
push edi
mov eax, dword [0x4bb27c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x54]
mov ecx, dword [ebp + 0x50]
push eax
push ecx
lea edx, [ebp + 0x20]
xor edi, edi
mov dword [ebp - 4], edi
push edx
mov byte [ebp - 4], 2
call fcn.00439a80
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x41c7e4
mov eax, dword [ebp + 0x28]
sub eax, ecx
sar eax, 3
cmp edi, eax
jae 0x41c7e4
mov eax, dword [ecx + edi*8]
sub eax, 0x10
push eax
call fcn.00403120
lea esi, [eax + 0x10]
add esp, 4
mov dword [ebp + 0x30], esi
mov eax, dword [ebp + 0x50]
push 0
push 0
push esi
push eax
lea ecx, [ebp + 0x38]
push ecx
mov byte [ebp - 4], 4
call fcn.004378a0
mov eax, dword [eax]
add esp, 0x14
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
mov eax, dword [ebp + 0x38]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41c6db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x41c7bc
push str.RefreshEnvironmentVariables
lea ecx, [ebp + 0x44]
call fcn.004031f0
push 0x48dbdc
lea ecx, [ebp + 0x3c]
mov byte [ebp - 4], 5
call fcn.004031f0
push 0
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp + 0x40]
push ecx
call fcn.00435510
add esp, 0xc
mov ebx, eax
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x41c734
and eax, 0xffff
or eax, 0x80070000
lea edx, [ebp + 0x44]
push edx
push 0x8d
lea ecx, [ebp + 0x3c]
push ecx
push eax
push ebx
lea ecx, [ebp - 0x48]
call fcn.0041fce0
lea ecx, [ebp - 0x48]
call fcn.0041dd40
mov eax, dword [ebp + 0x40]
add eax, 0xfffffff0
mov byte [ebp - 4], 6
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41c776
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x3c]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c799
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x44]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c7bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c7dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 1
jmp 0x41c664
test ecx, ecx
mov byte [ebp - 4], 2
je 0x41c80d
mov edx, dword [ebp + 0x30]
push edx
mov edx, dword [ebp + 0x28]
lea eax, [ebp + 0x20]
push eax
push edx
push ecx
call fcn.0041c570
mov eax, dword [ebp + 0x24]
add esp, 0x10
push eax
call fcn.004657f0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x48
mov esp, ebp
pop ebp
ret