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

Disassembly:
push ebx
push esi
push edi
push 0x21a
call fcn.004896c5
add esp, 4
mov edi, eax
push 0x21a
call fcn.004896c5
add esp, 4
mov esi, eax
push 0x218
call fcn.004896c5
add esp, 4
mov dword [0x54e4cc], eax
test edi, edi
je 0x405652
test esi, esi
je 0x405644
test eax, eax
je 0x405644
xor eax, eax
push edi
mov word [edi], ax
push 0xfc
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x405410
push edi
call fcn.00489083
add esp, 4
push esi
call fcn.00489083
add esp, 4
push dword [0x54e4cc]
jmp 0x405669
mov edx, dword [0x54e4cc]
mov ecx, edi
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x405420
push 0x4ddcf4
push 0x4ddcf8
call fcn.0048951e
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add esp, 8
test eax, eax
jne 0x4054a9
push esi
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x4054b2
push esi
call ebx
test eax, eax
je 0x4054b2
push str.FT2_clone
call fcn.0048b7a5
add esp, 4
test eax, eax
je 0x405496
push str.FT2_clone
call fcn.0048a525
add esp, 4
push str.FT2_clone
call fcn.0048b7a5
add esp, 4
test eax, eax
jne 0x4054b2
push dword [0x54e4cc]
push 0xfc
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x4054b2
push eax
call fcn.00489248
add esp, 4
push esi
call fcn.00489083
add esp, 4
push edi
call ebx
push edi
call fcn.00489083
mov ecx, dword [0x54e4cc]
add esp, 4
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4054d0
mov eax, dword [str.FT2.CFG]
mov dword [ecx], eax
mov eax, dword [0x4ddd10]
mov dword [ecx + 4], eax
mov eax, dword [0x4ddd14]
mov dword [ecx + 8], eax
mov eax, dword [0x4ddd18]
mov dword [ecx + 0xc], eax
mov ax, word [0x4ddd1c]
mov word [ecx + 0x10], ax
cmp byte [0x552470], 0
mov esi, dword [0x54e4cc]
je 0x4055b7
test esi, esi
jne 0x405523
xor ebx, ebx
jmp 0x4055b1
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x405526
sub esi, ecx
sar esi, 1
lea eax, [esi*2 + 0x18]
push eax
call fcn.004896c5
mov ebx, eax
add esp, 4
xor eax, eax
mov edi, ebx
mov word [ebx], ax
mov edx, dword [0x54e4cc]
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [edi], cx
lea edi, [edi + 2]
test cx, cx
jne 0x405554
xor eax, eax
lea ecx, [ebx - 2]
mov word [ebx + esi*2 - 0xe], ax
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x405570
mov eax, dword [str.mididev.ini]
mov dword [ecx], eax
mov eax, dword [0x4ddc90]
mov dword [ecx + 4], eax
mov eax, dword [0x4ddc94]
mov dword [ecx + 8], eax
mov eax, dword [0x4ddc98]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4ddc9c]
mov dword [ecx + 0x10], eax
mov eax, dword [0x4ddca0]
mov dword [ecx + 0x14], eax
mov esi, dword [0x54e4cc]
mov dword [0x54e4d4], ebx
test esi, esi
jne 0x4055c7
xor ebx, ebx
mov dword [0x54e4d0], ebx
pop edi
pop esi
pop ebx
ret
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4055d0
sub esi, ecx
sar esi, 1
lea eax, [esi*2 + 0x1a]
push eax
call fcn.004896c5
mov ebx, eax
add esp, 4
xor eax, eax
mov edi, ebx
mov word [ebx], ax
mov edx, dword [0x54e4cc]
nop
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [edi], cx
lea edi, [edi + 2]
test cx, cx
jne 0x405600
xor eax, eax
lea edi, [ebx - 2]
mov word [ebx + esi*2 - 0xe], ax
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x405620
mov ecx, 6
mov esi, str.audiodev.ini
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [0x54e4d0], ebx
pop edi
pop esi
pop ebx
ret
push edi
call fcn.00489083
mov eax, dword [0x54e4cc]
add esp, 4
test esi, esi
je 0x405664
push esi
call fcn.00489083
mov eax, dword [0x54e4cc]
add esp, 4
test eax, eax
je 0x405671
push eax
call fcn.00489083
add esp, 4
push str.Error:_Couldnt_set_config_file_location._You_cant_load_save_the_config_
mov dword [0x54e4cc], 0
call fcn.00446950
add esp, 4
pop edi
pop esi
pop ebx
ret