Function at 0x525d10
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x590340
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x74]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x18]
push eax
mov ecx, str..scrpt
call fcn.00481430
lea ebx, [esp + 0x20]
mov byte [esp + 0x7c], 1
call fcn.00471030
push eax
lea ecx, [esp + 0x20]
push ecx
mov ebx, 0x5bb9ec
mov byte [esp + 0x84], 2
call fcn.00478cb0
add esp, 8
mov esi, eax
mov byte [esp + 0x7c], 3
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
cmp ecx, eax
mov edi, eax
jbe 0x525da7
call fcn.00565fa7
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
cmp ecx, eax
lea ebx, [esp + 0x40]
mov ebp, ecx
jbe 0x525db6
call fcn.00565fa7
push edi
push ebx
lea eax, [esp + 0x48]
push ebp
push eax
lea edx, [esp + 0x38]
push edx
mov ebx, eax
call fcn.0043dd20
lea eax, [esp + 0x18]
push eax
push esi
mov ecx, ebx
mov dword [esp + 0x58], 0
call fcn.00546cf0
mov esi, eax
mov byte [esp + 0x7c], 2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x525e06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x7c], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x525e2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x7c], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x525e50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x52619f
mov edx, dword [0x5f7780]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f7780
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x18], ebp
mov byte [esp + 0x7c], 4
mov edx, dword [esp + 0x44]
test edx, edx
je 0x526159
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x50]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x526159
mov esi, ecx
add ecx, 1
cmp esi, eax
mov dword [esp + 0x50], ecx
jb 0x525eab
call fcn.00565fa7
mov edx, dword [esp + 0x44]
mov ecx, dword [edx + esi*4]
lea eax, [ecx - 0x10]
lea esi, [ebp - 0x10]
cmp eax, esi
je 0x525efe
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x525eed
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x525eed
call fcn.00481090
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x525ee4
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea ebp, [ebx + 0x10]
mov dword [esp + 0x18], ebp
jmp 0x525efe
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.00480ff0
mov ebp, dword [esp + 0x18]
xor ebx, ebx
or eax, 0xffffffff
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x54], vtable.BkJson::Document.0
mov dword [esp + 0x60], vtable.BkJson::Error.0
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
lea ecx, [esp + 0x54]
push ecx
mov ecx, ebp
mov byte [esp + 0x80], 5
call fcn.00485270
test eax, eax
je 0x52610a
mov edi, dword [esp + 0x5c]
cmp edi, ebx
je 0x526110
cmp dword [edi + 0xc], 2
jne 0x526110
push 0x5b3dc0
lea ecx, [edi + 0x14]
call fcn.00485f30
neg eax
sbb eax, eax
neg eax
cmp eax, ebx
je 0x526110
lea edx, [esp + 0x28]
push edx
mov ebx, 0x5b3dc0
lea edi, [esp + 0x58]
call fcn.00485900
mov eax, dword [eax + 8]
test eax, eax
je 0x525f99
cmp dword [eax + 0xc], 5
jne 0x525f99
mov eax, dword [eax + 0x14]
jmp 0x525f9b
xor eax, eax
xor ecx, ecx
cmp eax, 1
sete cl
mov dword [esp + 0x28], vtable.BkJson::Handle.0
mov eax, ecx
test eax, eax
je 0x52610a
mov edi, dword [esp + 0x5c]
test edi, edi
je 0x5260e6
cmp dword [edi + 0xc], 2
jne 0x5260e6
push 0x5aa300
lea ecx, [edi + 0x14]
call fcn.00485f30
neg eax
sbb eax, eax
neg eax
je 0x5260e6
mov edx, dword [0x5f7780]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f7780
call eax
mov edx, dword [0x5f7780]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x5f7780
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x34]
push ecx
mov ebx, 0x5aa300
lea edi, [esp + 0x58]
mov byte [esp + 0x80], 6
call fcn.00485900
mov byte [esp + 0x7c], 7
mov eax, dword [eax + 8]
test eax, eax
je 0x52604a
cmp dword [eax + 0xc], 4
jne 0x52604a
mov edx, dword [eax + 0x14]
test edx, edx
jne 0x526050
xor eax, eax
jmp 0x526064
xor edx, edx
xor eax, eax
jmp 0x526064
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x526055
sub eax, esi
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x24]
call fcn.00480ff0
mov byte [esp + 0x7c], 6
lea eax, [esp + 0x18]
lea edi, [esp + 0x24]
mov dword [esp + 0x34], vtable.BkJson::Handle.0
call fcn.00480f90
mov esi, dword [esp + 0x84]
add esi, 0xc
lea ebx, [esp + 0x20]
call fcn.00526570
mov byte [esp + 0x7c], 5
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5260c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5260e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x54], vtable.BkJson::Document.0
test edi, edi
mov byte [esp + 0x7c], 9
je 0x525e6f
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
jmp 0x525e6f
mov edi, dword [esp + 0x5c]
xor ebx, ebx
lea eax, [ebp - 0x10]
call fcn.00481090
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x52613b
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x52613b
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5260e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x5260e6
lea eax, [ebp - 0x10]
mov byte [esp + 0x7c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52617a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x526198
mov edi, dword [esp + 0x48]
call fcn.0043dda0
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00563626
add esp, 4
mov eax, 1
jmp 0x5261bf
mov eax, dword [esp + 0x44]
test eax, eax
je 0x5261bd
mov edi, dword [esp + 0x48]
call fcn.0043dda0
mov edx, dword [esp + 0x44]
push edx
call fcn.00563626
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 4