Function at 0x1034957
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 4], esi
jne 0x103498c
call fcn.0101b2d9
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0101b282
add esp, 0x14
or eax, 0xffffffff
jmp 0x1034a21
push ebx
mov ebx, dword [eax]
cmp ebx, esi
push edi
mov dword [ebp - 8], ebx
je 0x1034a11
push 0x3d
push ebx
call fcn.0101800f
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
je 0x1034a11
cmp ebx, edi
je 0x1034a11
xor eax, eax
cmp word [edi + 2], si
sete al
mov dword [ebp - 0xc], eax
mov eax, dword [0x10418c8]
cmp eax, dword [0x10418cc]
jne 0x10349ce
call fcn.010348f8
mov dword [0x10418c8], eax
cmp eax, esi
jne 0x1034a5f
cmp dword [ebp + 0xc], esi
mov eax, dword [0x10418c0]
je 0x1034a24
cmp eax, esi
je 0x1034a24
call fcn.0101958a
mov dword [0x1041894], eax
call fcn.010191b9
mov ebx, eax
mov eax, dword [0x10418c8]
call fcn.010348f8
cmp ebx, esi
mov dword [0x10418c8], eax
jge 0x1034a5f
call fcn.0103239f
test eax, eax
je 0x1034a5f
call fcn.0101b2d9
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop ebx
pop esi
leave
ret
cmp dword [ebp - 0xc], esi
jne 0x1034cea
cmp eax, esi
jne 0x1034a4c
push 4
call fcn.0101d1a4
cmp eax, esi
pop ecx
mov dword [0x10418c0], eax
je 0x1034a1c
mov dword [eax], esi
cmp dword [0x10418c8], esi
jne 0x1034a5f
push 4
call fcn.0101d1a4
cmp eax, esi
pop ecx
mov dword [0x10418c8], eax
je 0x1034a1c
mov dword [eax], esi
mov eax, dword [0x10418c8]
cmp eax, esi
mov dword [ebp - 0x14], eax
je 0x1034a1c
sub edi, dword [ebp - 8]
push dword [ebp - 8]
sar edi, 1
mov dword [ebp - 0x10], edi
call fcn.0103489d
mov ebx, eax
cmp ebx, esi
pop ecx
jl 0x1034ae5
mov ecx, dword [ebp - 0x14]
cmp dword [ecx], esi
je 0x1034ae5
lea edi, [ecx + ebx*4]
mov eax, dword [edi]
cmp eax, dword [0x10418cc]
jb 0x1034a9e
cmp eax, dword [0x1043db0]
jbe 0x1034aa8
push eax
call fcn.0101b331
pop ecx
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0xc], esi
jne 0x1034ac2
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
jmp 0x1034b38
mov eax, dword [edi + 4]
inc ebx
mov dword [edi], eax
lea edi, [ecx + ebx*4]
cmp dword [edi], esi
jne 0x1034ab9
cmp ebx, 0x3fffffff
jae 0x1034b38
push 4
push ebx
push dword [0x10418c8]
call fcn.01020c7b
add esp, 0xc
cmp eax, esi
je 0x1034b38
jmp 0x1034b33
cmp dword [ebp - 0xc], esi
jne 0x1034cdc
cmp ebx, esi
jge 0x1034af4
neg ebx
lea eax, [ebx + 2]
cmp eax, ebx
jl 0x1034a1c
cmp eax, 0x3fffffff
jae 0x1034a1c
push eax
push 4
push dword [0x10418c8]
call fcn.01020c7b
add esp, 0xc
cmp eax, esi
je 0x1034a1c
mov ecx, dword [ebp - 8]
lea ebx, [eax + ebx*4]
mov dword [ebx], ecx
mov ecx, dword [ebp + 8]
mov dword [ebx + 4], esi
mov dword [ecx], esi
mov dword [0x10418c8], eax
cmp dword [ebp + 0xc], esi
je 0x1034cc6
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1034b47
sub eax, edx
sar eax, 1
add eax, 2
push 2
push eax
call fcn.0101d10a
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
mov dword [ebp - 0x18], edi
je 0x1034cc6
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1034b75
push dword [ebp - 8]
sub eax, edx
sar eax, 1
add eax, 2
push eax
push edi
call fcn.0101cf73
add esp, 0xc
test eax, eax
je 0x1034ba4
push esi
push esi
push esi
push esi
push esi
call fcn.0101b1d7
add esp, 0x14
mov eax, dword [ebp - 0x10]
lea ebx, [edi + eax*2]
mov word [ebx], si
inc ebx
inc ebx
cmp dword [0x1041558], 1
jne 0x1034be6
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
not eax
and eax, ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x1034be6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1034be2
mov dword [0x1041558], esi
jmp 0x1034bf2
or dword [ebp - 4], 0xffffffff
cmp dword [0x1041558], esi
jne 0x1034cae
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
call edi
cmp eax, esi
mov dword [ebp + 8], eax
je 0x1034c95
push 1
push eax
call fcn.0101d10a
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x1034c95
push esi
push esi
push dword [ebp + 8]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x18]
push esi
push esi
call edi
test eax, eax
je 0x1034c95
cmp dword [ebp - 0xc], esi
jne 0x1034c75
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
cmp eax, esi
mov dword [ebp + 8], eax
je 0x1034c95
push 1
push eax
call fcn.0101d10a
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x1034c95
push esi
push esi
push dword [ebp + 8]
push eax
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
test eax, eax
jne 0x1034c75
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0xffffffff
je 0x1034c99
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x10]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x1034c99
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x10]
call fcn.0101b331
push dword [ebp - 0x14]
call fcn.0101b331
mov edi, dword [ebp - 0x18]
pop ecx
pop ecx
cmp dword [ebp - 4], 0xffffffff
jne 0x1034cbf
call fcn.0101b2d9
mov dword [eax], 0x2a
push edi
call fcn.0101b331
pop ecx
cmp dword [ebp - 0xc], esi
je 0x1034cd4
push dword [ebp - 8]
call fcn.0101b331
pop ecx
mov eax, dword [ebp - 4]
jmp 0x1034a1f
push dword [ebp - 8]
call fcn.0101b331
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], esi
xor eax, eax
jmp 0x1034a1f