Function at 0x40d1fb
Capabilities:
Query environment variable

Disassembly:
push ebp
sub esp, 0x82c
lea ebp, [esp - 4]
mov eax, dword [0x56f710]
xor eax, ebp
mov dword [ebp + 0x82c], eax
push 0xc
mov eax, 0x4d60bd
call fcn.004b6730
mov esi, ecx
and dword [ebp - 4], 0
lea ebx, [ebp + 0x838]
call fcn.0040c8c6
mov ebx, eax
call fcn.0040c913
lea eax, [ebp + 0x838]
push eax
mov ecx, esi
call fcn.004025ee
xor edi, edi
jmp 0x40d25c
movzx eax, word [eax]
cmp ax, 0x22
jne 0x40d26d
push edi
xor eax, eax
push esi
inc eax
call fcn.00407277
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
jge 0x40d249
push 0x80070057
call fcn.00402977
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
cmp eax, edi
je 0x40d494
lea ecx, [eax - 1]
mov eax, esi
call fcn.00402bbf
cmp ax, 0x22
jne 0x40d29a
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
dec eax
push eax
xor eax, eax
push esi
inc eax
call fcn.00407277
push 0x530c70
xor ecx, ecx
call fcn.00407898
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40d2bd
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ecx
inc eax
push ecx
inc eax
push esi
call fcn.00407277
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..exe
call fcn.0040254f
mov ecx, esi
call fcn.0040d4c7
cmp eax, edi
jne 0x40d30a
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..dll
call fcn.0040254f
mov ecx, esi
call fcn.0040d4c7
cmp eax, edi
jne 0x40d30a
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..ocx
call fcn.0040254f
mov ecx, esi
call fcn.0040d4c7
push 0x530c9c
xor ecx, ecx
call fcn.00407898
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40d32b
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407277
push 0x5307f8
xor ecx, ecx
call fcn.00407898
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x40d3f8
mov edi, esi
call fcn.00411ec6
push eax
lea ecx, [ebp - 0x14]
call fcn.004022fa
mov ebx, 0x82c
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004b62d0
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40d378
push dword [ebp - 0x14]
lea eax, [ebp]
call fcn.0040cbd2
lea eax, [ebp + 0x41a]
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040254f
lea edi, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00411ec6
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 1
jle 0x40d3cf
push eax
xor ecx, ecx
call fcn.00407898
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jle 0x40d3bd
push 0x5307f8
mov ecx, eax
call fcn.00407898
jmp 0x40d3cf
test ecx, ecx
jl 0x40d3cf
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407277
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004b62d0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.00402845
push 0x52f454
xor ecx, ecx
call fcn.00407898
mov edi, eax
cmp edi, 0xffffffff
je 0x40d43c
push 0x530c3c
xor ecx, ecx
call fcn.00407898
cmp eax, 0xffffffff
je 0x40d420
cmp eax, edi
jle 0x40d43c
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push edi
sub eax, edi
push esi
call fcn.00407277
mov ebx, esi
call fcn.0040c8c6
mov ebx, eax
call fcn.0040c913
push esi
lea ecx, [ebp + 0x838]
call fcn.004025ee
push 0
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411e72
cmp eax, 0xffffffff
je 0x40d494
inc eax
push eax
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411e72
cmp eax, 0xffffffff
je 0x40d494
mov edi, 0x800
push edi
mov ecx, esi
call fcn.0040294d
push edi
push eax
push dword [ebp + 0x838]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.004123c7
mov ecx, dword [ebp + 0x838]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x82c]
xor ecx, ebp
call fcn.004b228f
add ebp, 0x830
leave
ret 4