Function at 0x10018610
Capabilities:
Check if file exists
Create thread
Get file attributes
Read file on windows
Set file attributes

Disassembly:
sub esp, 0x228
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x224], eax
push ebp
push edi
mov edi, ecx
push 0x206
xor ebp, ebp
lea ecx, [esp + 0x2a]
xor eax, eax
push ebp
push ecx
mov dword [esp + 0x1c], edi
mov word [esp + 0x30], ax
call fcn.100d4cc0
add esp, 0xc
mov dword [esp + 0x18], ebp
mov dword [esp + 0xc], ebp
cmp edi, ebp
je 0x10018685
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x10018660
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x10018685
mov eax, edi
call fcn.100196e0
mov eax, dword [0x101d30b0]
cmp eax, 0xe
je 0x1001868d
or eax, 0xffffffff
jmp 0x10018a17
mov eax, edi
mov ecx, 0x104
lea edx, [esp + 0x24]
call fcn.10003cf0
cmp eax, ebp
jl 0x10018685
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrW]
push 0x2e
push ebp
lea edx, [esp + 0x30]
push edx
call esi
cmp eax, ebp
je 0x100186e6
push 0x2e
push ebp
lea edx, [esp + 0x30]
xor ecx, ecx
push edx
mov word [eax], cx
call esi
mov esi, eax
cmp esi, ebp
je 0x100186e6
push 0x38
add esi, 2
push 0xa
mov dword [esp + 0x20], esi
call fcn.100d1909
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, ebp
jne 0x100186ee
or eax, 0xffffffff
jmp 0x10018a16
push ebx
mov ebx, eax
mov eax, dword [str.flac]
lea ecx, [eax + ebp]
push ecx
push esi
call fcn.100d2c8a
add esp, 8
test eax, eax
jne 0x1001872f
cmp dword [esp + 0x14], 0xa
jae 0x1001872f
mov edx, dword [str.flac]
inc dword [esp + 0x14]
mov edi, ebx
lea esi, [edx + ebp]
mov ecx, 0xe
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add ebx, 0x38
add ebp, 0x38
cmp ebp, 0x8f8
jl 0x100186f1
cmp dword [esp + 0x14], 0
jne 0x10018758
mov eax, dword [esp + 0x10]
push eax
call fcn.100d1800
add esp, 4
mov eax, 0xfffffffe
jmp 0x10018a15
call fcn.10018510
mov dword [esp + 0x24], eax
test eax, eax
je 0x10018a05
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
push edi
mov ebp, eax
call ebx
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001880e
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x24]
push eax
push 0x2000
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
push edi
call ebx
xor ebx, ebx
cmp dword [esp + 0x18], ebx
je 0x10018a05
cmp dword [esp + 0x20], 0x104
jb 0x10018a05
mov edi, dword [esp + 0x23c]
mov dword [0x101dd348], ebx
cmp edi, ebx
je 0x100188d1
lea ebp, [ebx + 4]
push 0x2c
push ebp
call fcn.100d1909
mov esi, eax
add esp, 8
mov dword [esp + 0x1c], esi
cmp esi, ebx
jne 0x10018818
mov edx, dword [esp + 0x10]
push edx
jmp 0x10018a0a
cmp edi, 0x6ddd00
jbe 0x1001882b
lea eax, [edi - 0x6ddd00]
mov dword [esi + 0x28], eax
jmp 0x1001882e
mov dword [esi + 0x28], ebx
lea ecx, [edi + 0x6ddd00]
mov dword [esi + 0x54], edi
push 4
add edi, 0xdbba00
push 4
mov dword [esi + 0x80], ecx
mov dword [esi + 0xac], edi
call fcn.100d1909
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10018873
push esi
call fcn.100d1800
mov edx, dword [esp + 0x14]
push edx
call fcn.100d1800
add esp, 8
jmp 0x10018a12
xor edi, edi
add esi, 0xc
mov edx, dword [esp + 0x24]
push 0
push 0
lea eax, [esi - 0xc]
push eax
mov dword [eax], 0xe
mov dword [esi - 8], 0x101d30b4
mov ecx, dword [esp + 0x2c]
push 0x10018a30
mov dword [esi], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 4], edx
mov edx, dword [esp + 0x20]
push 0
push 0
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov dword [esi + 0x14], ebp
mov dword [esi + 0x18], 0x6ddd00
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + edi*4], eax
inc edi
add esi, 0x2c
cmp edi, ebp
jb 0x10018878
jmp 0x100189a7
call fcn.10019670
mov ebp, eax
cmp ebp, 4
jb 0x100188de
dec ebp
push 0x2c
push ebp
call fcn.100d1909
mov esi, eax
add esp, 8
mov dword [esp + 0x1c], esi
cmp esi, ebx
jne 0x100188fd
mov eax, dword [esp + 0x10]
push eax
jmp 0x10018a0a
push 4
push ebp
call fcn.100d1909
mov ebx, eax
xor edi, edi
add esp, 8
cmp ebx, edi
jne 0x10018928
push esi
call fcn.100d1800
mov ecx, dword [esp + 0x14]
push ecx
call fcn.100d1800
add esp, 8
jmp 0x10018a12
cmp ebp, edi
jbe 0x100189ab
xor edx, edx
mov eax, 0x6000000
div ebp
mov dword [esp + 0x28], edi
add esi, 0xc
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esi - 0xc]
push 0
mov dword [eax], 0xe
mov dword [esi - 8], 0x101d30b4
mov edx, dword [esp + 0x28]
push eax
mov dword [esi], edx
mov edx, dword [esp + 0x20]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x1c]
push 0x10018a30
mov dword [esi + 8], edx
mov edx, dword [esp + 0x28]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x38]
push 0
push 0
mov dword [esi + 0x18], edx
mov dword [esi + 0x14], ebp
mov dword [esi + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [esp + 0x18]
add dword [esp + 0x28], edx
mov dword [ebx + edi*4], eax
inc edi
add esi, 0x2c
cmp edi, ebp
jb 0x10018944
mov esi, dword [esp + 0x1c]
push 0xffffffffffffffff
push 1
push ebx
push ebp
mov dword [0x101d30b8], 0
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, dword [0x101dd348]
mov dword [0x101d30b8], 1
test eax, eax
jne 0x100189e8
test edi, edi
je 0x100189e8
cmp dword [0x101d30c0], 0
jne 0x100189e8
mov dword [0x101d30c0], edi
push ebx
call fcn.100d1800
push esi
call fcn.100d1800
mov eax, dword [esp + 0x18]
push eax
call fcn.100d1800
add esp, 0xc
mov eax, edi
jmp 0x10018a15
mov ecx, dword [esp + 0x10]
push ecx
call fcn.100d1800
add esp, 4
or eax, 0xffffffff
pop ebx
pop esi
mov ecx, dword [esp + 0x22c]
pop edi
pop ebp
xor ecx, esp
call fcn.100d0738
add esp, 0x228
ret 4