Function at 0x10039040
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10041230
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x1004f0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0x90], 0
mov ecx, dword [ebp + 8]
call dword [sym.imp.KwDataDef.dll_public:_class_CLocalResource____thiscall_CSongInfoBase::GetLocalRes_void_]
test eax, eax
je 0x100391cb
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 8]
call dword [sym.imp.KwDataDef.dll_public:_class_CLocalResource____thiscall_CSongInfoBase::GetLocalRes_void_]
mov ecx, eax
call dword [sym.imp.KwDataDef.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_CLocalResource::GetPath_void_]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.1001d220
movzx ecx, al
test ecx, ecx
jne 0x10039113
call fcn.10026490
push eax
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x88]
call fcn.10028870
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x9c], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x90]
or ecx, 1
mov dword [ebp - 0x90], ecx
mov ecx, dword [ebp - 0x9c]
call fcn.100289b0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10039113
mov dword [ebp - 0x98], 1
jmp 0x1003911d
mov dword [ebp - 0x98], 0
mov dl, byte [ebp - 0x98]
mov byte [ebp - 0x8a], dl
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x90]
and eax, 1
je 0x1003914d
and dword [ebp - 0x90], 0xfffffffe
lea ecx, [ebp - 0x88]
call fcn.10028970
movzx ecx, byte [ebp - 0x8a]
test ecx, ecx
je 0x100391bc
push 0x10043d24
lea ecx, [ebp - 0x70]
call fcn.10027c00
mov byte [ebp - 4], 2
lea edx, [ebp - 0x70]
push edx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xf8]
call eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.10014c20
push 3
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xf0]
call eax
mov byte [ebp - 0x8c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.100033c0
mov al, byte [ebp - 0x8c]
jmp 0x100392ad
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.100033c0
mov byte [ebp - 0x89], 0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [ebp - 0x94]
call fcn.100392d0
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.1001d220
movzx eax, al
test eax, eax
jne 0x10039218
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x9c]
call edx
mov byte [ebp - 0x89], 1
jmp 0x10039267
mov eax, dword [ebp - 0x94]
cmp dword [eax + 0x40], 0
jne 0x10039267
push 0x100448b4
lea ecx, [ebp - 0x58]
call fcn.10027c00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x58]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0xf8]
call edx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x58]
call fcn.10014c20
push 3
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xf0]
call eax
mov ecx, dword [ebp - 0x94]
cmp dword [ecx + 0x5c], 3
je 0x1003927f
mov edx, dword [ebp - 0x94]
cmp dword [edx + 0x5c], 6
jne 0x1003928c
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KwLib.dll_int___cdecl_KwLib::Dir::RemoveFile_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 4
mov cl, byte [ebp - 0x89]
mov byte [ebp - 0x8b], cl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.100033c0
mov al, byte [ebp - 0x8b]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1003b334
mov esp, ebp
pop ebp
ret 8