Function at 0x40bcd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x4b206c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x20]
push dword [ebp + 0xc]
call fcn.004137d0
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x40bcff
mov eax, dword [eax]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
mov eax, dword [ebp - 0xc]
cmp eax, 8
jb 0x40bd5f
mov ecx, dword [ebp - 0x20]
inc eax
cmp eax, 0x7fffffff
ja 0x40bf91
add eax, eax
cmp eax, 0x1000
jb 0x40bd56
test cl, 0x1f
jne 0x40bf96
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x40bf9b
sub ecx, eax
cmp ecx, 4
jb 0x40bfa0
cmp ecx, 0x23
ja 0x40bfa5
mov ecx, eax
push ecx
call fcn.00460c6b
add esp, 4
test ebx, ebx
jne 0x40bd78
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00460c27
mov esp, ebp
pop ebp
ret 0xc
test edi, edi
je 0x40bf7c
xor ecx, ecx
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00460c70
add esp, 4
lea ecx, [ebp - 0x20]
mov esi, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004137d0
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x40bdb6
mov eax, dword [eax]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, dword [ebp - 0xc]
cmp eax, 8
jb 0x40be12
mov ecx, dword [ebp - 0x20]
inc eax
cmp eax, 0x7fffffff
ja 0x40bfaa
add eax, eax
cmp eax, 0x1000
jb 0x40be09
test cl, 0x1f
jne 0x40bfaf
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x40bfb4
sub ecx, eax
cmp ecx, 4
jb 0x40bfb9
cmp ecx, 0x23
ja 0x40bfbe
mov ecx, eax
push ecx
call fcn.00460c6b
add esp, 4
xor eax, eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], 0
mov word [ebp - 0x38], ax
cmp word [esi], ax
jne 0x40be2f
xor ecx, ecx
jmp 0x40be43
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40be34
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x38]
call fcn.00401a46
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x20]
call fcn.004136b0
mov ebx, eax
cmp edi, ebx
je 0x40bec8
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x40bea3
mov eax, dword [edi]
inc ecx
cmp ecx, 0x1000
jb 0x40be9a
test al, 0x1f
jne 0x40bfc3
mov ecx, dword [eax - 4]
cmp ecx, eax
jae 0x40bfc8
sub eax, ecx
cmp eax, 4
jb 0x40bfcd
cmp eax, 0x23
ja 0x40bfd2
mov eax, ecx
push eax
call fcn.00460c6b
add esp, 4
mov dword [edi + 0x14], 0xf
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], 0
jb 0x40bebb
mov eax, dword [edi]
jmp 0x40bebd
mov eax, edi
push ebx
mov ecx, edi
mov byte [eax], 0
call fcn.00405f64
mov eax, dword [ebp - 0xc]
cmp eax, 0x10
jb 0x40bf0e
mov ecx, dword [ebp - 0x20]
inc eax
cmp eax, 0x1000
jb 0x40bf05
test cl, 0x1f
jne 0x40bfd7
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x40bfdc
sub ecx, eax
cmp ecx, 4
jb 0x40bfe1
cmp ecx, 0x23
ja 0x40bfe6
mov ecx, eax
push ecx
call fcn.00460c6b
add esp, 4
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], 0xf
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x20], 0
cmp eax, 8
jb 0x40bf73
mov ecx, dword [ebp - 0x38]
inc eax
cmp eax, 0x7fffffff
ja 0x40bfeb
add eax, eax
cmp eax, 0x1000
jb 0x40bf6a
test cl, 0x1f
jne 0x40bff0
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x40bff5
sub ecx, eax
cmp ecx, 4
jb 0x40bffa
cmp ecx, 0x23
ja 0x40bfff
mov ecx, eax
push ecx
call fcn.00460c6b
add esp, 4
push esi
call fcn.00461100
add esp, 4
mov ecx, dword [ebp - 8]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00460c27
mov esp, ebp
pop ebp
ret 0xc
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
call fcn.004662a1
int3