Function at 0x4a50e0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4daa4f
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x517b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x517658
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x4a5138
push 1
push 0x4f9cd4
call fcn.00402d00
add esp, 8
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push 0x4f9cec
push eax
call fcn.00468340
push 0x5c
push 0x517658
mov dword [ebp - 4], 0
call fcn.004ab2c0
add esp, 0x10
mov dword [ebp - 0x18], 0
test eax, eax
je 0x4a51a7
sub eax, 0x517658
sar eax, 1
mov ecx, eax
neg ecx
sbb ecx, ecx
add eax, eax
and ecx, 2
push ecx
push 0x4e454c
push eax
push 0x517658
call fcn.004a2980
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x20], esi
mov edi, dword [ebp - 0x20]
mov ebx, 1
mov byte [ebp - 4], 1
jmp 0x4a51d3
push 0x517658
call fcn.004a27e0
push eax
push 0x517658
call fcn.004a29e0
mov edi, eax
add esp, 0xc
mov dword [ebp - 0x20], edi
mov esi, dword [ebp - 0x20]
mov ebx, 2
mov dword [ebp - 4], 2
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4a51e4
mov ecx, eax
call fcn.004a26e0
mov dword [ebp - 4], 3
test bl, 2
je 0x4a5205
and ebx, 0xfffffffd
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 5
test edi, edi
je 0x4a5205
mov ecx, edi
call fcn.004a2a20
mov byte [ebp - 4], 6
test bl, 1
je 0x4a5221
mov byte [ebp - 4], 7
test esi, esi
je 0x4a521d
mov ecx, esi
call fcn.004a2a20
mov byte [ebp - 4], 6
push 0x4f3dd4
call fcn.004a27e0
push eax
push 0x4f3dd4
call fcn.004a29e0
add esp, 0xc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x14]
call fcn.004a24b0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 9
push ecx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, eax
call fcn.004a24b0
mov esi, eax
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x4a5275
call fcn.004a2a20
mov ecx, dword [esi]
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x4a5283
call fcn.004a26e0
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x4a5293
call fcn.004a2a20
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 4], 0xc
test ecx, ecx
je 0x4a52a3
call fcn.004a2a20
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 0xd
test ecx, ecx
je 0x4a52b3
call fcn.004a2a20
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.004a2380
push eax
push 0x4f9cfc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x104
push 0x517658
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x517658
call fcn.004a5fa0
mov eax, dword [0x52ed94]
add esp, 4
mov dword [0x52edc8], eax
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 0xe
test ecx, ecx
je 0x4a5305
call fcn.004a2a20
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xf
test ecx, ecx
je 0x4a5318
call fcn.004a2a20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a71aa
mov esp, ebp
pop ebp
ret