Function at 0x4f9900
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1bc
mov eax, dword [0x639ac0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0x1800001
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x1bc], eax
jne 0x4f9c5a
test edi, edi
je 0x4f9c5a
test ecx, ecx
je 0x4f9956
mov eax, dword [ecx]
test eax, eax
je 0x4f9956
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4f9956
mov dword [0x1b57a68], eax
mov dword [0x1b57a6c], ecx
jmp 0x4f995b
mov eax, dword [0x1b57a68]
push esi
push 0x314
test eax, eax
je 0x4f9969
call eax
jmp 0x4f9971
call fcn.0052fde1
add esp, 4
mov esi, eax
mov dword [edi], esi
test esi, esi
jne 0x4f998c
lea eax, [esi + 3]
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
push 0x314
push 0
push esi
call fcn.004ff750
push str.atiadlxy.dll
push str.atiadlxx.dll
call fcn.004fcc10
add esp, 0x14
mov dword [esi], eax
test eax, eax
jne 0x4f99f1
mov dword [edi], eax
mov eax, dword [0x1b57a6c]
push esi
test eax, eax
je 0x4f99d4
call eax
pop esi
mov eax, 6
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
call fcn.00529865
add esp, 4
mov eax, 6
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
push ebx
push esi
call fcn.004f95e0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4f9a42
mov ecx, dword [0x1b57a6c]
mov dword [edi], 0
push esi
test ecx, ecx
je 0x4f9a27
call ecx
mov eax, ebx
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
call fcn.00529865
add esp, 4
mov eax, ebx
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
lea eax, [esi + 4]
push eax
mov eax, dword [esi + 8]
push 1
push 0x4f93f0
call eax
add esp, 0xc
test eax, eax
je 0x4f9a9f
mov eax, dword [0x1b57a6c]
mov dword [edi], 0
push esi
test eax, eax
je 0x4f9a81
call eax
pop ebx
pop esi
mov eax, 8
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
call fcn.00529865
add esp, 4
mov eax, 8
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
push str.TRUE
push str.ADL_4KWORKAROUND_CANCEL
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.004fc030
push 0x1a4
xor edi, edi
lea eax, [ebp - 0x1a8]
push edi
push eax
call fcn.004ff750
mov ebx, dword [sym.imp.USER32.dll_EnumDisplayDevicesA]
lea eax, [ebp - 0x1ac]
add esp, 0x10
mov dword [ebp - 0x1ac], 0x1a8
push edi
push eax
push edi
push edi
call ebx
test eax, eax
je 0x4f9c05
test byte [ebp - 0x108], 4
jne 0x4f9b11
push 0
lea eax, [ebp - 0x1ac]
inc edi
push eax
push edi
push 0
call ebx
test eax, eax
jne 0x4f9af0
jmp 0x4f9c05
cmp dword [esi + 0x310], 0
mov dword [ebp - 0x1b4], 0
jle 0x4f9c05
xor eax, eax
mov dword [ebp - 0x1b0], eax
mov ebx, dword [esi + 0x30c]
lea ecx, [ebp - 0x1a8]
add eax, 0x218
add eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4f9b63
test dl, dl
je 0x4f9b5f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4f9b63
add eax, 2
add ecx, 2
test dl, dl
jne 0x4f9b43
xor eax, eax
jmp 0x4f9b68
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4f9bdb
mov edi, dword [esi + 0x308]
xor edx, edx
test edi, edi
jle 0x4f9bdb
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [esi + 0x304]
mov ebx, dword [eax + ebx + 0x10c]
mov dword [ebp - 0x1b8], ebx
imul eax, dword [ecx + 0x68], 0x624
add eax, dword [esi + 0x30c]
cmp dword [eax + 0x10c], ebx
jne 0x4f9bcd
mov edi, dword [esi + 0x30c]
mov ebx, dword [ebp - 0x1b0]
mov eax, dword [eax + 0x108]
cmp eax, dword [ebx + edi + 0x108]
mov edi, dword [esi + 0x308]
mov ebx, dword [ebp - 0x1b8]
je 0x4f9bd7
inc edx
add ecx, 0x70
cmp edx, edi
jl 0x4f9b91
jmp 0x4f9bdb
or dword [ecx + 8], 2
mov edx, dword [ebp - 0x1b4]
mov eax, dword [ebp - 0x1b0]
inc edx
add eax, 0x624
mov dword [ebp - 0x1b4], edx
mov dword [ebp - 0x1b0], eax
cmp edx, dword [esi + 0x310]
jl 0x4f9b30
mov ecx, dword [ebp - 0x1bc]
test ecx, ecx
je 0x4f9c47
lea eax, [esi + 0x104]
mov dword [ecx], eax
lea eax, [esi + 0x204]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x304]
mov dword [ecx + 0xc], eax
mov eax, dword [esi + 0x308]
push esi
mov dword [ecx + 8], eax
call fcn.004fcb20
push esi
call fcn.004fc3b0
push esi
call fcn.004fcd10
add esp, 0xc
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f66cd
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 2
xor ecx, ebp
pop edi
call fcn.004f66cd
mov esp, ebp
pop ebp
ret