Function at 0x40ce48
Capabilities:
Query environment variable

Disassembly:
push ebp
sub esp, 0x82c
lea ebp, [esp - 4]
mov eax, dword [0x55f6c0]
xor eax, ebp
mov dword [ebp + 0x82c], eax
push 0xc
mov eax, 0x4cdad3
call fcn.004ae920
mov esi, ecx
and dword [ebp - 4], 0
lea ebx, [ebp + 0x838]
call fcn.0040c520
mov ebx, eax
call fcn.0040c56d
lea eax, [ebp + 0x838]
push eax
mov ecx, esi
call fcn.0040260d
xor edi, edi
jmp 0x40cea9
movzx eax, word [eax]
cmp ax, 0x22
jne 0x40ceba
push edi
xor eax, eax
push esi
inc eax
call fcn.00407198
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
jge 0x40ce96
push 0x80070057
call fcn.004029b5
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
cmp eax, edi
je 0x40d0e1
lea ecx, [eax - 1]
mov eax, esi
call fcn.00402bdb
cmp ax, 0x22
jne 0x40cee7
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
dec eax
push eax
xor eax, eax
push esi
inc eax
call fcn.00407198
push 0x5257f0
xor ecx, ecx
call fcn.004077ca
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40cf0a
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ecx
inc eax
push ecx
inc eax
push esi
call fcn.00407198
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..exe
call fcn.0040253e
mov ecx, esi
call fcn.0040d114
cmp eax, edi
jne 0x40cf57
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..dll
call fcn.0040253e
mov ecx, esi
call fcn.0040d114
cmp eax, edi
jne 0x40cf57
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..ocx
call fcn.0040253e
mov ecx, esi
call fcn.0040d114
push 0x52581c
xor ecx, ecx
call fcn.004077ca
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40cf78
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407198
push 0x525378
xor ecx, ecx
call fcn.004077ca
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x40d045
mov edi, esi
call fcn.00411b13
push eax
lea ecx, [ebp - 0x14]
call fcn.00402582
mov ebx, 0x82c
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004ae4c0
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40cfc5
push dword [ebp - 0x14]
lea eax, [ebp]
call fcn.0040c81f
lea eax, [ebp + 0x41a]
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040253e
lea edi, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00411b13
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 1
jle 0x40d01c
push eax
xor ecx, ecx
call fcn.004077ca
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jle 0x40d00a
push 0x525378
mov ecx, eax
call fcn.004077ca
jmp 0x40d01c
test ecx, ecx
jl 0x40d01c
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.00407198
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004ae4c0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.00402883
push 0x523fe8
xor ecx, ecx
call fcn.004077ca
mov edi, eax
cmp edi, 0xffffffff
je 0x40d089
push 0x5257bc
xor ecx, ecx
call fcn.004077ca
cmp eax, 0xffffffff
je 0x40d06d
cmp eax, edi
jle 0x40d089
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push edi
sub eax, edi
push esi
call fcn.00407198
mov ebx, esi
call fcn.0040c520
mov ebx, eax
call fcn.0040c56d
push esi
lea ecx, [ebp + 0x838]
call fcn.0040260d
push 0
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411abf
cmp eax, 0xffffffff
je 0x40d0e1
inc eax
push eax
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00411abf
cmp eax, 0xffffffff
je 0x40d0e1
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.00411fe7
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.004aa923
add ebp, 0x830
leave
ret 4