Function at 0x40ce13
Capabilities:
Query environment variable

Disassembly:
push ebp
sub esp, 0x82c
lea ebp, [esp - 4]
mov eax, dword [0x55c6c0]
xor eax, ebp
mov dword [ebp + 0x82c], eax
push 0xc
mov eax, 0x4cd680
call fcn.004ae200
mov esi, ecx
and dword [ebp - 4], 0
lea ebx, [ebp + 0x838]
call fcn.0040c507
mov ebx, eax
call fcn.0040c554
lea eax, [ebp + 0x838]
push eax
mov ecx, esi
call fcn.0040262c
xor edi, edi
jmp 0x40ce74
movzx eax, word [eax]
cmp ax, 0x22
jne 0x40ce85
push edi
xor eax, eax
push esi
inc eax
call fcn.00407190
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
jge 0x40ce61
push 0x80070057
call fcn.004029b5
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
cmp eax, edi
je 0x40d0ac
lea ecx, [eax - 1]
mov eax, esi
call fcn.00402bdb
cmp ax, 0x22
jne 0x40ceb2
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
dec eax
push eax
xor eax, eax
push esi
inc eax
call fcn.00407190
push 0x5236f0
xor ecx, ecx
call fcn.004077b1
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40ced5
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ecx
inc eax
push ecx
inc eax
push esi
call fcn.00407190
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..exe
call fcn.0040255d
mov ecx, esi
call fcn.0040d0df
cmp eax, edi
jne 0x40cf22
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..dll
call fcn.0040255d
mov ecx, esi
call fcn.0040d0df
cmp eax, edi
jne 0x40cf22
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..ocx
call fcn.0040255d
mov ecx, esi
call fcn.0040d0df
push 0x52371c
xor ecx, ecx
call fcn.004077b1
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40cf43
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407190
push 0x523278
xor ecx, ecx
call fcn.004077b1
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x40d010
mov edi, esi
call fcn.00411ade
push eax
lea ecx, [ebp - 0x14]
call fcn.004025a1
mov ebx, 0x82c
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004adda0
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40cf90
push dword [ebp - 0x14]
lea eax, [ebp]
call fcn.0040c7ea
lea eax, [ebp + 0x41a]
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040255d
lea edi, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00411ade
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 1
jle 0x40cfe7
push eax
xor ecx, ecx
call fcn.004077b1
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jle 0x40cfd5
push 0x523278
mov ecx, eax
call fcn.004077b1
jmp 0x40cfe7
test ecx, ecx
jl 0x40cfe7
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407190
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004adda0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.00402883
push 0x521eec
xor ecx, ecx
call fcn.004077b1
mov edi, eax
cmp edi, 0xffffffff
je 0x40d054
push 0x5236bc
xor ecx, ecx
call fcn.004077b1
cmp eax, 0xffffffff
je 0x40d038
cmp eax, edi
jle 0x40d054
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push edi
sub eax, edi
push esi
call fcn.00407190
mov ebx, esi
call fcn.0040c507
mov ebx, eax
call fcn.0040c554
push esi
lea ecx, [ebp + 0x838]
call fcn.0040262c
push 0
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411a8a
cmp eax, 0xffffffff
je 0x40d0ac
inc eax
push eax
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411a8a
cmp eax, 0xffffffff
je 0x40d0ac
mov edi, 0x800
push edi
mov ecx, esi
call fcn.0040298b
push edi
push eax
push dword [ebp + 0x838]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.00411fca
mov ecx, dword [ebp + 0x838]
add ecx, 0xfffffff0
call fcn.00402883
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.004aa206
add ebp, 0x830
leave
ret 4