Function at 0x1013bc10
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x810
mov eax, dword [0x10291440]
xor eax, esp
mov dword [esp + 0x80c], eax
push ebx
mov ebx, dword [esp + 0x818]
push ebp
mov ebp, dword [esp + 0x820]
push esi
push edi
mov edi, dword [esp + 0x82c]
push ebp
mov dword [esp + 0x1c], ebp
call fcn.102344a8
mov ecx, eax
add esp, 4
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x1013bc8d
mov edx, ecx
lea esi, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x1013bc60
sub edx, esi
cmp edx, dword [esp + 0x830]
jae 0x1013be35
mov edx, dword [edi]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x1013bc78
xor eax, eax
jmp 0x1013be50
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1013bc92
sub ecx, edx
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
lea esi, [ecx + 1]
lea eax, [esi + esi]
push eax
push ebx
call fcn.100dc800
add esp, 0xc
test eax, eax
jne 0x1013be50
push esi
push dword [esp + 0x18]
push 0xffffffffffffffff
push ebp
push eax
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1013bcee
call fcn.100f3810
push eax
call fcn.100f3830
add esp, 4
test eax, eax
jne 0x1013be50
push 0x800
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1013bd1e
push eax
push ebx
call fcn.100dc7e0
add esp, 8
mov dword [esp + 0x14], 0
test esi, esi
jne 0x1013bd55
call fcn.100f3810
mov esi, eax
cmp esi, 0xcb
jne 0x1013bd3e
mov dword [edi], 0
xor eax, eax
jmp 0x1013be50
push str.GetEnvironmentVariable
push esi
push ebx
call fcn.100d0ec0
push esi
call fcn.100f3830
jmp 0x1013be4d
cmp esi, 0x800
jg 0x1013be2b
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x1c]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call esi
mov ebp, eax
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push ebp
push ebx
call fcn.100dc800
add esp, 0xc
test eax, eax
jne 0x1013be50
push eax
push eax
push ebp
push dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call esi
test eax, eax
jne 0x1013bdd1
call fcn.100f3810
push eax
call fcn.100f3830
add esp, 4
test eax, eax
jne 0x1013be50
mov ecx, dword [esp + 0x10]
mov edx, ecx
lea esi, [edx + 1]
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x1013bde0
sub edx, esi
cmp edx, dword [esp + 0x830]
jae 0x1013be08
mov edx, dword [edi]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x1013bdf4
mov ecx, dword [esp + 0x10]
jmp 0x1013be0e
mov dword [edi], 0
test ecx, ecx
je 0x1013be22
push ecx
push ebx
call fcn.100dc7e0
add esp, 8
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp dword [edi], 0
je 0x1013be31
xor eax, eax
jmp 0x1013be50
mov ecx, dword [esp + 0x10]
jmp 0x1013be35
mov ebp, dword [esp + 0x18]
push ecx
push ebp
push str._s:_buffer_too_small_to_hold_environment_variable__s
push ebx
mov dword [edi], 0
call fcn.100d0920
mov eax, 0x16
add esp, 0x10
mov ecx, dword [esp + 0x81c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1021eb98
add esp, 0x810
ret