Function at 0x4038e0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x45e048
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x491104]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3c]
lea eax, [ebp + 0x14]
push eax
lea ecx, [esp + 0x20]
call fcn.00406730
mov dword [esp + 0x34], 0
push str.klaes.lic
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 1
mov eax, dword [esp + 0x18]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
or esi, 0xffffffff
test eax, eax
jne 0x4039ef
push str.install_insert_licensedisk
lea ecx, [esp + 0x24]
call fcn.00406e00
mov byte [esp + 0x34], 2
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004160f0
add esp, 8
mov byte [esp + 0x34], 3
mov eax, dword [eax]
push 0
push 1
push eax
call fcn.0042f5c8
cmp eax, 2
sete bl
mov byte [esp + 0x34], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4039b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4039d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x403afd
mov ecx, dword [esp + 0x18]
push ecx
call edi
test eax, eax
je 0x403954
push str.installKLAESPreRequisitesAladdinServerInst
add ebp, 0x10
lea edx, [esp + 0x18]
push ebp
push edx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 6
push str.aladdin
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00406150
add esp, 0xc
mov bl, 7
mov byte [esp + 0x34], bl
mov edx, dword [esp + 0x3c]
push edx
call edi
test eax, eax
je 0x403b1f
push 6
push 0x46916c
lea ecx, [esp + 0x44]
call fcn.00406510
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.0040af60
add esp, 8
test al, al
jne 0x403b1f
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x2c]
push str.Error_copying
push eax
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x34], 8
push str._to
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 9
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004060a0
add esp, 0xc
mov byte [esp + 0x34], 0xa
mov eax, dword [eax]
push 0
push 0
push eax
call fcn.0042f5c8
mov byte [esp + 0x34], 9
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x34], 8
lea ecx, [esp + 0x20]
call fcn.00406ed0
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x34], 6
lea ecx, [esp + 0x3c]
call fcn.00406ed0
mov byte [esp + 0x34], 1
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x34], 0
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x34], esi
lea ecx, [esp + 0x1c]
call fcn.00406ed0
xor al, al
jmp 0x403c75
lea ecx, [esp + 0x24]
push ecx
call fcn.00410440
add esp, 4
mov byte [esp + 0x34], 0xb
push str.resources
push eax
lea edx, [esp + 0x30]
push edx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 0xc
push eax
lea ecx, [esp + 0x40]
call fcn.00406800
mov byte [esp + 0x34], 0xb
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x24]
call fcn.00406ed0
push str._resources
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 0xd
push eax
lea ecx, [esp + 0x18]
call fcn.00406800
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x28]
call fcn.00406ed0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.0040af60
add esp, 8
test al, al
jne 0x403c3c
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x24]
push str.Error_copying
push edx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x34], 0xe
push str._to
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x34], 0xf
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x30]
push edx
call fcn.004060a0
add esp, 0xc
mov byte [esp + 0x34], 0x10
mov eax, dword [eax]
push 0
push 0
push eax
call fcn.0042f5c8
mov byte [esp + 0x34], 0xf
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x34], 0xe
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x20]
jmp 0x403adc
mov byte [esp + 0x34], 6
lea ecx, [esp + 0x3c]
call fcn.00406ed0
mov byte [esp + 0x34], 1
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x34], 0
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x34], esi
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov al, 1
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4