Function at 0x4501b0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x453be6
push eax
mov dword fs:[0], esp
sub esp, 0x764
push esi
push str.CRYSTAL
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
test eax, eax
je 0x45029c
cmp byte [eax], 0
je 0x45029c
push eax
lea ecx, [esp + 8]
call fcn.004148a0
mov dword [esp + 4], 0x455778
push 0
push 0x3b
lea ecx, [esp + 0xc]
mov dword [esp + 0x778], 0
call fcn.0041e180
cmp eax, 0xffffffff
jne 0x45021e
mov eax, dword [esp + 0xc]
push ebx
push eax
push 0
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x14]
call fcn.0041ef80
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x18]
mov byte [esp + 0x774], 1
call eax
call fcn.0044fc60
mov esi, eax
test esi, esi
lea ecx, [esp + 0x44]
setne bl
mov byte [esp + 0x774], 0
call fcn.0041e9c0
test bl, bl
pop ebx
mov dword [esp + 0x770], 0xffffffff
mov dword [esp + 4], 0x45569c
lea ecx, [esp + 4]
je 0x450297
call fcn.0041e9c0
mov eax, esi
pop esi
mov ecx, dword [esp + 0x764]
mov dword fs:[0], ecx
add esp, 0x770
ret
call fcn.0041e9c0
mov eax, 0x400
lea esi, [esp + 0x260]
mov edx, 0x80000001
call fcn.0044fbc0
test al, al
je 0x4502c5
mov eax, esi
call fcn.0044fc60
test eax, eax
jne 0x45047f
mov eax, 0x400
lea esi, [esp + 0x260]
mov edx, 0x80000002
call fcn.0044fbc0
test al, al
je 0x4502ee
mov eax, esi
call fcn.0044fc60
test eax, eax
jne 0x45047f
mov esi, dword [sym.imp.MSVCR80.dll_fopen]
push 0x461180
push str.vfs.cfg
call esi
add esp, 8
test eax, eax
je 0x45033e
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
lea ecx, [esp + 0x264]
push ecx
mov word [esp + 0x268], 0x2e
call fcn.0041ccc0
add esp, 8
pop esi
mov ecx, dword [esp + 0x764]
mov dword fs:[0], ecx
add esp, 0x770
ret
push 0x104
lea edx, [esp + 0x58]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x54]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_strrchr]
add esp, 8
test eax, eax
je 0x450368
mov byte [eax + 1], 0
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x54]
mov byte [esp + eax + 0x15c], cl
add eax, 1
test cl, cl
jne 0x450370
lea eax, [esp + 0x15c]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x450390
mov ecx, dword [str.vfs.cfg]
mov edx, dword [0x46117c]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [esp + 0x15c]
push 0x461180
push eax
call esi
add esp, 8
test eax, eax
je 0x4503dc
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea eax, [esp + 0x54]
call fcn.0044fc60
test eax, eax
jne 0x45047f
push edi
lea esi, [esp + 0x664]
mov edi, 0x26
call fcn.0044fe80
test al, al
je 0x450459
push 0x105
mov ecx, esi
push ecx
lea edx, [esp + 0x26c]
push edx
call sub.MSVCR80.dll_memcpy
lea eax, [esp + 0x270]
add esp, 0xc
mov byte [esp + 0x369], 0
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x450420
mov ecx, dword [str.crystalspace]
mov edx, dword [0x46116c]
mov dword [eax], ecx
mov ecx, dword [0x461170]
mov dword [eax + 4], edx
mov dx, word [0x461174]
mov dword [eax + 8], ecx
mov word [eax + 0xc], dx
lea eax, [esp + 0x264]
push eax
jmp 0x450476
mov ecx, 7
mov esi, str.C:Program_Filescrystalspace
lea edi, [esp + 0x264]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x264]
movsw word es:[edi], word [esi]
push ecx
call fcn.0041ccc0
add esp, 4
pop edi
mov ecx, dword [esp + 0x768]
pop esi
mov dword fs:[0], ecx
add esp, 0x770
ret