Function at 0x4942d0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a58f
mov eax, dword fs:[0]
push eax
sub esp, 0x290
mov eax, dword [0x5522c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, ecx
mov dword [ebp - 0x290], eax
mov dword [ebp - 0x298], edi
cmp byte [eax + 0x14], bl
je 0x494320
add eax, 4
mov dword [edi], eax
jmp 0x4949e7
mov ecx, dword [eax + 4]
lea esi, [eax + 4]
mov dword [ebp - 0x27c], esi
cmp ecx, ebx
je 0x494345
mov eax, dword [esi + 4]
call fcn.00494b20
mov eax, dword [esi]
push eax
call fcn.004e5281
add esp, 4
mov dword [esi], ebx
push 0x206
lea edx, [ebp - 0x21a]
xor ecx, ecx
push ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
push edx
mov dword [edi], ebx
mov word [ebp - 0x21c], cx
call fcn.004e9a40
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea edx, [ebp - 0x260]
push edx
lea ecx, [ebp - 0x21c]
call fcn.00459600
push 0xb
mov dword [ebp - 4], ebx
push str.realEnc.xml
lea ebx, [ebp - 0x260]
call fcn.0045b460
mov eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x494575
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x294], ebx
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x258], ebx
mov byte [ebp - 4], 5
xor ecx, ecx
mov word [ebp - 0x238], cx
mov edi, 7
push ebx
mov eax, 0x51d754
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
call fcn.00459bc0
mov dword [ebp - 0x26c], ebx
lea esi, [ebp - 0x28c]
call fcn.00470450
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x260]
cmp dword [eax - 4], 1
jle 0x494459
mov edx, dword [eax - 0xc]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.004596a0
mov eax, dword [ebp - 0x260]
xor ecx, ecx
mov word [ebp - 0x254], cx
mov ecx, eax
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x244], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x494473
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x254]
call fcn.00459bc0
lea ecx, [ebp - 0x254]
lea ebx, [ebp - 0x25c]
mov byte [ebp - 4], 9
call fcn.0045fa30
mov edi, 8
mov byte [ebp - 4], 8
mov bl, al
cmp dword [ebp - 0x240], edi
jb 0x4944c5
mov edx, dword [ebp - 0x254]
push edx
call fcn.004e5281
add esp, 4
test bl, bl
jne 0x4945a5
lea esi, [ebp - 0x28c]
call fcn.004704a0
mov eax, dword [ebp - 0x26c]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x224], edi
jb 0x4944fc
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.004e5281
add esp, 4
xor esi, esi
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x258]
xor edx, edx
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], esi
mov word [ebp - 0x238], dx
cmp eax, esi
je 0x49452d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x264]
cmp eax, esi
je 0x494543
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x268]
cmp eax, esi
je 0x494559
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x25c]
cmp eax, esi
je 0x494575
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 0x25c], esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x260]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x49459e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4949e9
mov ecx, dword [ebp - 0x25c]
xor eax, eax
mov dword [ebp - 0x270], eax
test ecx, ecx
je 0x4945cf
mov edx, dword [ecx]
lea eax, [ebp - 0x270]
push eax
push ecx
mov ecx, dword [edx + 0xb4]
call ecx
mov eax, dword [ebp - 0x270]
mov ebx, eax
mov dword [ebp - 0x278], ebx
test eax, eax
je 0x4946b1
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebx]
mov eax, dword [ecx]
lea edx, [ebp - 0x268]
push edx
push 0x50f89c
push ebx
mov dword [ebp - 0x294], ebx
call eax
mov edi, dword [ebp - 0x268]
test edi, edi
jne 0x49473f
lea esi, [ebp - 0x28c]
call fcn.004704a0
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea esi, [ebp - 0x238]
call fcn.00459870
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x494647
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x49465d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x268]
test eax, eax
je 0x494673
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 1
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ebx
call ecx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x49469f
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 0x25c], 0
lea ecx, [ebp - 0x260]
call fcn.00459240
xor al, al
jmp 0x4949e9
lea esi, [ebp - 0x28c]
call fcn.004704a0
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea esi, [ebp - 0x238]
call fcn.00459870
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x4946ea
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x494700
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x268]
test eax, eax
je 0x494716
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x494575
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 0x25c], 0
jmp 0x494575
push 0x5280c4
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
mov dword [ebp - 0x270], esi
test esi, esi
jne 0x494760
push 0x8007000e
call fcn.0045a4a0
lea edx, [ebp - 0x264]
push edx
mov byte [ebp - 4], 0xa
mov ecx, dword [edi]
mov eax, dword [ecx + 0x90]
push esi
push edi
call eax
mov byte [ebp - 4], 8
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push esi
call edi
mov eax, dword [ebp - 0x264]
test eax, eax
jne 0x4947a7
lea esi, [ebp - 0x28c]
call fcn.004704a0
mov ecx, dword [ebp - 0x26c]
push ecx
call edi
jmp 0x494626
mov ecx, dword [eax]
lea edx, [ebp - 0x274]
push edx
push eax
mov eax, dword [ecx + 0x20]
call eax
xor ecx, ecx
mov dword [ebp - 0x270], ecx
cmp dword [ebp - 0x274], ecx
jle 0x494913
mov eax, dword [ebp - 0x264]
mov edx, dword [eax]
lea esi, [ebp - 0x258]
push esi
push ecx
push eax
mov eax, dword [edx + 0x1c]
call eax
cmp dword [ebp - 0x258], 0
je 0x4948f4
mov eax, 0x5280e0
lea esi, [ebp - 0x254]
call fcn.00459cd0
lea ecx, [ebp - 0x238]
push ecx
mov edx, esi
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x258]
push edx
call fcn.0045fff0
mov byte [ebp - 4], 8
call fcn.00459870
mov edx, dword [ebp - 0x238]
mov ebx, 8
cmp dword [ebp - 0x224], ebx
jae 0x494838
lea edx, [ebp - 0x238]
lea edi, [ebp - 0x28c]
call fcn.004595c0
mov eax, str.name
lea esi, [ebp - 0x254]
call fcn.00459cd0
lea eax, [ebp - 0x238]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
push ecx
mov ecx, dword [ebp - 0x258]
call fcn.0045fff0
mov byte [ebp - 4], 8
call fcn.00459870
mov edx, dword [ebp - 0x238]
cmp dword [ebp - 0x224], ebx
jae 0x494889
lea edx, [ebp - 0x238]
lea edi, [ebp - 0x288]
call fcn.004595c0
mov eax, dword [ebp - 0x258]
mov edx, dword [eax]
mov edx, dword [edx + 0x68]
lea ecx, [ebp - 0x26c]
push ecx
push eax
call edx
mov edx, dword [ebp - 0x26c]
lea edi, [ebp - 0x284]
call fcn.004595c0
mov ecx, dword [ebp - 0x27c]
lea edi, [ebp - 0x28c]
mov byte [ebp - 0x280], 0
call fcn.00494a10
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x4948ee
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 0x258], 0
mov ebx, dword [ebp - 0x278]
mov ecx, dword [ebp - 0x270]
inc ecx
mov dword [ebp - 0x270], ecx
cmp ecx, dword [ebp - 0x274]
jl 0x4947ca
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x27c]
mov ecx, dword [ebp - 0x298]
mov edx, dword [ebp - 0x290]
mov dword [ecx], eax
lea esi, [ebp - 0x28c]
mov byte [edx + 0x14], 1
call fcn.004704a0
mov eax, dword [ebp - 0x26c]
push eax
call edi
lea esi, [ebp - 0x238]
call fcn.00459870
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x494966
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x49497c
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x268]
test eax, eax
je 0x494992
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [ebp - 4], 1
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ebx
call ecx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x4949be
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 0x25c], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x260]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4949e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004e4d50
mov esp, ebp
pop ebp
ret 4