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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100e32da
mov eax, dword fs:[0]
push eax
sub esp, 0x894
mov eax, dword [0x10121b54]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100b28f0
push 0x208
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.100b28f0
add esp, 0x18
lea eax, [ebp - 0x830]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x218]
mov edx, 0x104
lea esi, [ebp - 0x830]
mov eax, ecx
sub esi, eax
nop
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1005a1de
movzx eax, word [esi + ecx]
test ax, ax
je 0x1005a1de
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x1005a1c0
lea eax, [ecx - 2]
test edx, edx
push 0x208
cmovne eax, ecx
xor ecx, ecx
push ecx
mov word [eax], cx
lea eax, [ebp - 0x420]
push eax
call fcn.100b28f0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.1000a020
mov ecx, eax
test ecx, ecx
je 0x1005a500
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x8a0], eax
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x628]
mov dword [ebp - 4], 0
push eax
call ebx
push str.JsBasiclog
lea eax, [ebp - 0x628]
push eax
call ebx
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1005a27c
lea eax, [ebp - 0x628]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
call fcn.1000a020
mov ecx, eax
test ecx, ecx
je 0x1005a50a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x894], eax
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x894]
test eax, 0xffff0000
jne 0x1005a2bb
movzx eax, ax
push eax
call fcn.1000a430
jmp 0x1005a2c1
push eax
call fcn.10035930
push 0
lea eax, [ebp - 0x894]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x89c]
push eax
call fcn.10072bd0
add esp, 0xc
mov edx, dword [ebp - 0x894]
or edi, 0xffffffff
mov byte [ebp - 4], 4
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005a301
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x89c]
lea eax, [ebp - 0x8a0]
push str.JsBasicLog_s.js_basic.log
push eax
call fcn.100149e0
mov esi, dword [ebp - 0x8a0]
lea eax, [ebp - 0x218]
add esp, 0xc
push esi
push eax
call ebx
push dword [ebp - 0x89c]
lea ecx, [ebp - 0x848]
call fcn.10008030
mov eax, dword [0x1012703c]
mov byte [ebp - 4], 5
test al, 1
jne 0x1005a3fb
or eax, 1
mov dword [0x1012703c], eax
push str.computercenter
lea ecx, [ebp - 0x890]
mov byte [ebp - 4], 6
call fcn.10008030
push str.ComputerZTray
lea ecx, [ebp - 0x878]
mov byte [ebp - 4], 7
call fcn.10008030
push str.ComputerZ_CN
lea ecx, [ebp - 0x860]
mov byte [ebp - 4], 8
call fcn.10008030
push dword [ebp - 0x898]
lea eax, [ebp - 0x848]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x890]
mov dword [0x10127030], 0
push eax
mov ecx, 0x10127030
mov dword [0x10127034], 0
mov dword [0x10127038], 0
call fcn.1005a6c0
push fcn.10008ee0
push 3
push 0x18
lea eax, [ebp - 0x890]
mov byte [ebp - 4], 6
push eax
call fcn.10097ad1
push 0x100ea1c0
call fcn.10097f39
add esp, 4
mov byte [ebp - 4], 5
sub esp, 0x18
lea eax, [ebp - 0x848]
mov ecx, esp
mov dword [ebp - 0x898], ecx
push eax
call fcn.10007fa0
push dword [0x10127034]
lea eax, [ebp - 0x898]
push dword [0x10127030]
push eax
call fcn.1005a800
mov eax, dword [ebp - 0x898]
xor ebx, ebx
mov edx, dword [ebp - 0x834]
add esp, 0x24
cmp eax, dword [0x10127034]
mov byte [ebp - 4], 4
setne bl
cmp edx, 8
jb 0x1005a482
mov ecx, dword [ebp - 0x848]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1005a478
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1005a514
push edx
push ecx
call fcn.10097bcf
add esp, 8
lea eax, [ebp - 0x218]
push 0x100ebac4
test ebx, ebx
je 0x1005a498
push 0xa00000
jmp 0x1005a49d
push 0x6400000
push 0
push 1
push eax
call fcn.1006b4d0
mov edx, dword [ebp - 0x89c]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005a4c8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x1005a4e4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10097f4e
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10009e10
push 0x80004005
call fcn.10009e10
call fcn.100b5e29
int3