Function at 0x422852
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 8], ebx
push edi
test eax, eax
jne 0x422885
call fcn.0040973a
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.0040982c
add esp, 0x14
or eax, 0xffffffff
jmp 0x4228f2
mov ebx, dword [eax]
push esi
test ebx, ebx
je 0x4228e3
push 0x3d
push ebx
call fcn.00422fe0
mov esi, eax
mov dword [ebp - 0xc], esi
pop ecx
pop ecx
test esi, esi
je 0x4228e3
cmp ebx, esi
je 0x4228e3
mov al, byte [esi + 1]
mov edi, dword [0x4250d0]
mov byte [ebp - 1], al
cmp edi, dword [0x425108]
jne 0x4228c9
push edi
call fcn.00422ac3
mov edi, eax
mov al, byte [ebp - 1]
pop ecx
mov dword [0x4250d0], edi
test edi, edi
jne 0x422939
cmp dword [ebp + 0xc], edi
je 0x4228f6
cmp dword [0x4250d4], edi
je 0x4228f6
call fcn.004226e4
test eax, eax
je 0x42292f
call fcn.0040973a
mov dword [eax], 0x16
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
test al, al
je 0x422abc
push 4
call fcn.00406860
mov dword [0x4250d0], eax
pop ecx
test eax, eax
je 0x4228ee
and dword [eax], 0
cmp dword [0x4250d4], 0
jne 0x42292f
push 4
call fcn.00406860
mov dword [0x4250d4], eax
pop ecx
test eax, eax
je 0x4228ee
and dword [eax], 0
mov edi, dword [0x4250d0]
test edi, edi
je 0x4228ee
mov eax, esi
sub eax, ebx
push eax
push ebx
call fcn.00422b25
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x4229b4
cmp dword [edi], 0
je 0x4229b4
mov eax, dword [edi + esi*4]
cmp eax, dword [0x425108]
jb 0x422964
cmp eax, dword [0x4269c4]
jbe 0x42296b
push eax
call fcn.004066e0
pop ecx
cmp byte [ebp - 1], 0
je 0x422987
mov dword [edi + esi*4], ebx
mov edi, dword [ebp + 8]
and dword [edi], 0
jmp 0x422a06
mov eax, dword [edi + esi*4 + 4]
mov dword [edi + esi*4], eax
inc esi
cmp dword [edi + esi*4], 0
jne 0x42297f
cmp esi, 0x3fffffff
jae 0x422a03
push 4
push esi
push dword [0x4250d0]
call fcn.0041adfc
mov edi, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x422a06
mov dword [0x4250d0], eax
jmp 0x422a06
cmp byte [ebp - 1], 0
je 0x422aaf
test esi, esi
jns 0x4229c4
neg esi
lea eax, [esi + 2]
cmp eax, esi
jl 0x4228ee
cmp eax, 0x3fffffff
jae 0x4228ee
push eax
push 4
push dword [0x4250d0]
call fcn.0041adfc
add esp, 0xc
test eax, eax
je 0x4228ee
mov edi, dword [ebp + 8]
and dword [eax + esi*4 + 4], 0
mov dword [eax + esi*4], ebx
and dword [edi], 0
jmp 0x4229ad
mov edi, dword [ebp + 8]
cmp dword [ebp + 0xc], 0
je 0x422a97
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x422a15
sub ecx, edx
push 1
lea eax, [ecx + 2]
push eax
call fcn.0040ec28
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x422a97
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x422a36
sub ecx, edx
push ebx
lea eax, [ecx + 2]
push eax
push esi
call fcn.0040c078
add esp, 0xc
test eax, eax
je 0x422a60
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00409841
add esp, 0x14
movsx eax, byte [ebp - 1]
mov ecx, esi
sub ecx, ebx
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0
inc ecx
neg eax
sbb eax, eax
and eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x422a90
or dword [ebp - 8], 0xffffffff
call fcn.0040973a
mov dword [eax], 0x2a
push esi
call fcn.004066e0
pop ecx
cmp byte [ebp - 1], 0
jne 0x422aa7
push ebx
call fcn.004066e0
and dword [edi], 0
pop ecx
mov eax, dword [ebp - 8]
jmp 0x4228f1
push ebx
call fcn.004066e0
mov edi, dword [ebp + 8]
pop ecx
and dword [edi], 0
xor eax, eax
jmp 0x4228f1