Function at 0x424230
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
jne 0x424275
xor eax, eax
jne 0x42426d
push str.FALSE
push 0
push 0x5a
push str.setenv.c
push 2
call fcn.00409f40
add esp, 0x14
cmp eax, 1
jne 0x42426d
int3
or eax, 0xffffffff
jmp 0x4245a4
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4242a2
push 0x3d
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00424720
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4242a2
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x20]
jne 0x4242aa
or eax, 0xffffffff
jmp 0x4245a4
mov eax, dword [ebp - 0x20]
movsx ecx, byte [eax + 1]
neg ecx
sbb ecx, ecx
inc ecx
mov dword [ebp - 0x1c], ecx
mov edx, dword [0x42f1fc]
cmp edx, dword [0x42f200]
jne 0x4242da
mov eax, dword [0x42f1fc]
push eax
call fcn.00424630
add esp, 4
mov dword [0x42f1fc], eax
cmp dword [0x42f1fc], 0
jne 0x42439b
cmp dword [ebp + 0xc], 0
je 0x42430c
cmp dword [0x42f204], 0
je 0x42430c
call fcn.00423950
test eax, eax
je 0x424307
or eax, 0xffffffff
jmp 0x4245a4
jmp 0x42439b
cmp dword [ebp - 0x1c], 0
je 0x424319
xor eax, eax
jmp 0x4245a4
cmp dword [0x42f1fc], 0
jne 0x42435a
push 0x9c
push str.setenv.c
push 2
push 4
call fcn.0040b160
add esp, 0x10
mov dword [0x42f1fc], eax
cmp dword [0x42f1fc], 0
jne 0x42434e
or eax, 0xffffffff
jmp 0x4245a4
mov ecx, dword [0x42f1fc]
mov dword [ecx], 0
cmp dword [0x42f204], 0
jne 0x42439b
push 0xa3
push str.setenv.c
push 2
push 4
call fcn.0040b160
add esp, 0x10
mov dword [0x42f204], eax
cmp dword [0x42f204], 0
jne 0x42438f
or eax, 0xffffffff
jmp 0x4245a4
mov edx, dword [0x42f204]
mov dword [edx], 0
mov eax, dword [0x42f1fc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.004245b0
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jl 0x424464
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x424464
push 2
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4]
push eax
call fcn.0040bcf0
add esp, 8
cmp dword [ebp - 0x1c], 0
je 0x42444a
jmp 0x4243f4
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
cmp dword [eax + edx*4], 0
je 0x424415
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov eax, dword [esi + eax*4 + 4]
mov dword [edx + ecx*4], eax
jmp 0x4243eb
push 0xd1
push str.setenv.c
push 2
mov ecx, dword [ebp - 0xc]
shl ecx, 2
push ecx
mov edx, dword [0x42f1fc]
push edx
call fcn.0040b650
add esp, 0x14
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x424448
mov eax, dword [ebp - 8]
mov dword [0x42f1fc], eax
jmp 0x42445f
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp + 8]
mov dword [ecx], 0
jmp 0x4244fa
cmp dword [ebp - 0x1c], 0
jne 0x4244dc
cmp dword [ebp - 0xc], 0
jge 0x424478
mov edx, dword [ebp - 0xc]
neg edx
mov dword [ebp - 0xc], edx
push 0xe9
push str.setenv.c
push 2
mov eax, dword [ebp - 0xc]
lea ecx, [eax*4 + 8]
push ecx
mov edx, dword [0x42f1fc]
push edx
call fcn.0040b650
add esp, 0x14
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4244af
or eax, 0xffffffff
jmp 0x4245a4
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov dword [ecx + eax*4 + 4], 0
mov edx, dword [ebp + 8]
mov dword [edx], 0
mov eax, dword [ebp - 8]
mov dword [0x42f1fc], eax
jmp 0x4244fa
push 2
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0040bcf0
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx], 0
xor eax, eax
jmp 0x4245a4
cmp dword [ebp + 0xc], 0
je 0x42458d
push 0x109
push str.setenv.c
push 2
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040f920
add esp, 4
add eax, 2
push eax
call fcn.0040b160
add esp, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x42458d
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.0040f9b0
add esp, 8
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov byte [ecx], 0
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
xor eax, eax
cmp dword [ebp - 0x1c], 0
setne al
dec eax
and eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x42457f
mov dword [ebp - 0x10], 0xffffffff
push 2
mov edx, dword [ebp - 0x18]
push edx
call fcn.0040bcf0
add esp, 8
cmp dword [ebp - 0x1c], 0
je 0x4245a1
push 2
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040bcf0
add esp, 8
mov eax, dword [ebp - 0x10]
pop esi
mov esp, ebp
pop ebp
ret