Function at 0x10003560
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1784
call fcn.1000b9c0
push ebx
push esi
push edi
lea eax, [esp + 0x790]
mov dword [esp + 0x1c], eax
xor eax, eax
lea edx, [esp + 0x480]
mov ecx, 0x400
lea edi, [esp + 0x790]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x18]
push edx
push 0x104
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], ebx
mov byte [ecx], al
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x1000366d
mov al, byte [ebp + 0x1c]
test al, al
je 0x10003637
mov ecx, dword [ebp + 0x14]
push 0x105
lea eax, [esp + 0x274]
push eax
push 0xffffffffffffffff
push ecx
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x6c]
push eax
push 0x104
lea ecx, [esp + 0x27c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 0x104
jae 0x1000366d
lea edx, [esp + 0x270]
push 0x10018730
push edx
call fcn.1000bf8e
add esp, 8
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x1000366d
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x68]
push ecx
mov word [eax], bx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x10003688
mov esi, dword [ebp + 0x14]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x6c]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, 0x104
jae 0x1000366d
push 0x1001872c
push esi
call fcn.1000bf1f
add esp, 8
cmp eax, ebx
mov dword [esp + 0x20], eax
jne 0x10003676
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x68]
push edx
mov byte [ecx], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x10003961
mov eax, dword [esp + 0x20]
push eax
lea ebx, [esp + 0x6c]
mov ecx, ebx
push 0x104
push ecx
mov byte [esp + 0x1f], 0
mov byte [esp + 0x20], 0xef
mov byte [esp + 0x21], 0xbb
mov byte [esp + 0x22], 0xbf
call fcn.1000be3d
add esp, 0xc
test eax, eax
je 0x1000392f
mov ecx, 3
lea edi, [esp + 0x14]
mov esi, ebx
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x100036de
add ebx, 3
mov byte [esp + 0x13], 1
cmp byte [ebx], 0
mov eax, ebx
je 0x100036fe
mov cl, byte [eax]
cmp cl, 0xd
je 0x100036fb
cmp cl, 0xa
je 0x100036fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100036e5
jmp 0x100036fe
mov byte [eax], 0
cmp byte [ebx], 0
je 0x100038ed
push 0xb
push ebx
push str.LayerBreak
call fcn.10015c67
add esp, 0xc
test eax, eax
jne 0x10003730
lea eax, [ebx + 0xb]
push eax
call fcn.1000bdb5
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x100038ed
push 0xa
push ebx
push str.MediaType
call fcn.10015c67
add esp, 0xc
test eax, eax
jne 0x10003809
lea esi, [ebx + 0xa]
push esi
push 0x10018710
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x1000376a
mov dword [esp + 0x18], 1
jmp 0x100038ed
push esi
push 0x1001870c
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x10003789
mov dword [esp + 0x18], 2
jmp 0x100038ed
push esi
push str.HDDVD
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x100037a8
mov dword [esp + 0x18], 3
jmp 0x100038ed
push esi
push 0x10018700
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x100037c7
mov dword [esp + 0x18], 4
jmp 0x100038ed
push esi
push 0x100186fc
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x100037e6
mov dword [esp + 0x18], 5
jmp 0x100038ed
push esi
push str.BDRE
call fcn.10015bfe
add esp, 8
test eax, eax
jne 0x100038ed
mov dword [esp + 0x18], 6
jmp 0x100038ed
mov al, byte [ebp + 0x1c]
test al, al
je 0x1000389e
mov al, byte [esp + 0x13]
test al, al
jne 0x10003825
call fcn.10002560
mov byte [esp + 0x13], al
mov dl, byte [esp + 0x13]
push 0x104
neg dl
lea ecx, [esp + 0x58c]
push ecx
push 0xffffffffffffffff
push ebx
push 0
sbb edx, edx
and edx, 0xfde9
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x274]
push ecx
push 0x104
lea edx, [esp + 0x594]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 0x104
jae 0x10003961
mov esi, dword [esp + 0x1c]
push 0
push 0
push 0x104
push esi
push 0xffffffffffffffff
lea eax, [esp + 0x284]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x100038c3
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push edx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, 0x104
jae 0x10003961
mov esi, dword [esp + 0x1c]
mov eax, dword [ebp + 0x1c]
push eax
push esi
call fcn.100024e0
add esp, 8
test al, al
je 0x10003961
mov ecx, dword [ebp + 0x18]
push esi
mov byte [ecx], 1
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esi + eax + 1]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x20]
push eax
push 0x104
push ebx
call fcn.1000be3d
add esp, 0xc
test eax, eax
jne 0x100036c5
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x1000392f
push ebx
lea ecx, [esp + 0x38]
push str.MediaType_set_to__d_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [ebp + 8]
add esp, 0xc
mov byte [esi + 0x11d9], bl
jmp 0x10003932
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x794]
push eax
push ecx
push edx
push esi
call fcn.10003a10
add esp, 0x14
test eax, eax
mov dword [esp + 0x28], eax
je 0x10003961
mov eax, dword [esp + 0x24]
mov dword [esi + 0x11dc], eax
mov ecx, dword [esp + 0x20]
push ecx
call fcn.1000bd64
add esp, 4
lea edx, [esp + 0x480]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret