Function at 0x40d560
Capabilities:
Check if file exists
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5855d8
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x60e9b0]
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
lea ecx, [ebp - 0x74]
call fcn.00421b30
mov dword [ebp - 4], 0
mov edx, dword [eax]
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp word [edx], ax
jne 0x40d5b9
xor ecx, ecx
jmp 0x40d5cf
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d5c0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00406f40
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov edx, dword [ebp - 0x74]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d5fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor bl, bl
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
movzx ebx, bl
mov ecx, 1
mov dword [ebp - 0x44], 7
cmove ebx, ecx
mov dword [ebp - 0x48], 0
push 0xb
xor eax, eax
lea ecx, [ebp - 0x58]
push str.assCtl.json
mov word [ebp - 0x58], ax
call fcn.00406f40
mov byte [ebp - 4], 3
call fcn.00402f30
mov edx, dword [eax + 0x35c]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp word [edx], ax
jne 0x40d66a
xor ecx, ecx
jmp 0x40d67f
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d670
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00406f40
mov byte [ebp - 4], 4
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x40d6a2
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x74], eax
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x74]
push 0x5e9208
push eax
call fcn.00406550
add esp, 0xc
lea eax, [ebp - 0x74]
mov edx, 0x5e9944
lea ecx, [ebp - 0x7c]
push eax
call fcn.0040e810
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [eax]
cmp word [edx], 0
jne 0x40d6ed
xor ecx, ecx
jmp 0x40d701
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d6f2
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.0040e8e0
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x7c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d729
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, str.UserData_
lea ecx, [ebp - 0x78]
call fcn.00421780
mov byte [ebp - 4], 7
call fcn.0040bb30
test bl, bl
jne 0x40d7bd
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d772
xor ebx, ebx
jmp 0x40d784
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea ecx, [ebp - 0x40]
call fcn.0043bb90
movsd xmm1, qword [0x5f54d8]
comisd xmm1, xmm0
jae 0x40d893
call fcn.00556901
cmp ebx, eax
je 0x40d893
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
call fcn.0043dc60
push dword [ebp - 0x78]
lea ecx, [ebp - 0x70]
call fcn.00405a20
sub esp, 0x28
mov byte [ebp - 4], 8
mov eax, esp
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x70]
push 1
mov dword [eax], 0x5e9d50
mov dword [eax + 0x24], eax
lea eax, [ebp - 0x58]
push eax
call fcn.0043af80
mov byte [ebp - 4], 7
add esp, 0x30
mov ecx, dword [ebp - 0x5c]
mov dword [0x615830], eax
cmp ecx, 8
jb 0x40d813
lea eax, [ecx + 1]
push eax
push dword [ebp - 0x70]
lea ecx, [ebp - 0x70]
call fcn.00407af0
mov eax, dword [0x615830]
test eax, eax
je 0x40d87f
push dword [ebp - 0x78]
lea ecx, [ebp - 0x70]
call fcn.00405a20
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x70]
call fcn.0040ea10
cmp dword [0x61582c], 0
jne 0x40d855
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xbb8
call esi
cmp dword [0x61582c], 0
je 0x40d845
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [ebp - 0x70]
test eax, eax
je 0x40d87a
call fcn.00407bc0
mov esi, 1
jmp 0x40d895
call fcn.00407bc0
mov dword [0x615830], 0
mov dword [0x61582c], 0
xor esi, esi
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x78]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d8b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x74]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40d8cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40d8e4
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00407af0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], 0
cmp eax, 8
jb 0x40d90d
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00407af0
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp ecx, 8
jb 0x40d936
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00407af0
mov eax, esi
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.00555b37
mov esp, ebp
pop ebp
ret