Function at 0x10012e10
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xfffffffffffffffe
push 0x100718b0
push 0x10034900
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x10076098]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 0x420]
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0
mov dword [edi + 0x10], 0
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x10012e75
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
mov edx, edi
mov esi, dword [ebp + 0x41c]
mov ecx, esi
call fcn.10013080
mov bl, al
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x10012eb5
test bl, bl
jne 0x10013049
cmp esi, 0x1a
jne 0x10013049
lea esi, [edi + 0x10]
mov dword [ebp - 0x24], esi
mov dword [esi], 0
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x10012edc
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
push 0x410
push ecx
lea eax, [ebp]
push eax
call fcn.10034760
add esp, 0xc
push 0x207
lea eax, [ebp]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp]
push eax
call fcn.1003d469
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x2c], ecx
cmp eax, ecx
ja 0x10012f45
cmp ecx, 8
jb 0x10012f27
mov edi, dword [edi]
mov dword [esi], eax
lea esi, [eax + eax]
push esi
lea eax, [ebp]
push eax
push edi
call fcn.100341b0
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
jmp 0x10013038
cmp eax, 0x7ffffffe
ja 0x1001306e
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x10012f64
mov esi, SysReAllocString
jmp 0x10012f82
mov edx, ecx
shr edx, 1
mov eax, SysReAllocString
sub eax, edx
cmp ecx, eax
jbe 0x10012f7a
mov esi, SysReAllocString
jmp 0x10012f82
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x10012f94
or ecx, 0xffffffff
jmp 0x10012f9c
cmp ecx, 0x1000
jb 0x10012fc5
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.100325e6
add esp, 4
mov ecx, eax
test ecx, ecx
je 0x10013073
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x10012fd6
test ecx, ecx
je 0x10012fd4
push ecx
call fcn.100325e6
add esp, 4
jmp 0x10012fd6
xor eax, eax
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword [edx], ecx
mov dword [edi + 0x14], esi
lea esi, [ecx + ecx]
push esi
lea ecx, [ebp]
push ecx
push eax
call fcn.10033c30
add esp, 0xc
xor ecx, ecx
mov eax, dword [ebp - 0x20]
mov word [esi + eax], cx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 8
jb 0x10013036
lea ecx, [ecx*2 + 2]
mov eax, dword [edi]
cmp ecx, 0x1000
jb 0x10013029
add ecx, 0x23
mov edx, dword [eax - 4]
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10013073
mov eax, edx
push ecx
push eax
call fcn.100325d8
add esp, 8
mov eax, dword [ebp - 0x20]
mov dword [edi], eax
movzx ebx, bl
mov ecx, 1
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
cmovne ebx, ecx
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.100325c7
lea esp, [ebp + 0x414]
pop ebp
ret
call fcn.10001ab0
call fcn.1003d419
int3