Function at 0x413667
Capabilities:
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x15ac
call fcn.00470240
push ebx
xor eax, eax
cmp word [0x4868d8], ax
push esi
push edi
mov dword [ebp - 0xc], eax
je 0x413d69
push 0x475e44
mov edi, 0x4868d8
push edi
call fcn.00417162
mov esi, dword [sym.imp.NSCRT.dll__wcsicmp]
pop ecx
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x413714
push 0x4731d4
push edi
call fcn.00417162
pop ecx
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x413714
push 0x4731cc
push edi
call fcn.00417162
pop ecx
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x413714
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
test eax, eax
jne 0x4136fe
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x4136fe
push edi
push 0x104
push 0x485028
call fcn.00467521
jmp 0x413d6f
push edi
push 0x484e20
push 0x485028
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
jmp 0x413d6f
mov esi, 0x4865c0
push esi
mov ebx, 0x104
push ebx
push 0x485028
call fcn.00467521
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x4965c0
push str.skin_clean_up_ws
lea eax, [ebp - 0x19c]
push 0x4e
push eax
call fcn.00402528
lea eax, [ebp - 0x19c]
push esi
push eax
call fcn.004053c5
add esp, 0x18
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
test eax, eax
jne 0x413781
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x413781
push edi
push ebx
lea eax, [ebp - 0x3a4]
push eax
call fcn.00467521
jmp 0x413794
push edi
push 0x484e20
lea eax, [ebp - 0x3a4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push 0
lea eax, [ebp - 0x3a4]
push 0
push eax
call fcn.00402b25
mov esi, eax
push esi
call fcn.0041a8c5
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.NSCRT.dll_free]
add esp, 0x14
cmp dword [ebp - 4], 0
je 0x413d6f
push dword [ebp - 4]
and dword [ebp - 0x30], 0
call fcn.0041a1e0
test eax, eax
mov esi, dword [sym.imp.NSCRT.dll__stricmp]
pop ecx
jne 0x4138a7
push edi
push ebx
lea eax, [ebp - 0x5ac]
push eax
call fcn.00467521
lea eax, [ebp - 0x5ac]
push 0x2e
push eax
call dword [sym.imp.NSCRT.dll_wcschr]
pop ecx
xor edi, edi
test eax, eax
pop ecx
je 0x413806
mov word [eax], di
push str._skin.xml
push ebx
lea eax, [ebp - 0x5ac]
push eax
call fcn.0040bd1d
push edi
push edi
push edi
push edi
push ebx
lea eax, [ebp - 0x14c]
push eax
push edi
push dword [ebp - 4]
call fcn.0041a1b9
lea eax, [ebp - 0x14c]
push 0x475ed8
push eax
call esi
add esp, 0x28
test eax, eax
je 0x41386c
push edi
lea eax, [ebp - 0x5ac]
push edi
push eax
call fcn.00402b25
or dword [ebp - 0xc], 1
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14c]
push eax
call esi
add esp, 0x14
test eax, eax
mov byte [ebp - 5], 0
jne 0x413870
mov byte [ebp - 5], 1
test byte [ebp - 0xc], 1
je 0x413887
push dword [ebp - 0x14]
and dword [ebp - 0xc], 0xfffffffe
call dword [sym.imp.NSCRT.dll_free]
pop ecx
mov dword [ebp - 0x14], edi
cmp byte [ebp - 5], 0
jne 0x4138a0
push dword [ebp - 4]
call fcn.0041a222
test eax, eax
pop ecx
je 0x413818
jmp 0x4138a7
mov dword [ebp - 0x30], 1
push dword [ebp - 4]
call fcn.0041a1e0
test eax, eax
pop ecx
jne 0x413d5e
xor edi, edi
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
sbb eax, eax
neg eax
mov dword [ebp - 0x18], eax
je 0x4138e2
push edi
push 1
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], edi
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x4138f2
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
push edi
push edi
push edi
push 0x104
lea eax, [ebp - 0x14c]
push eax
push edi
push dword [ebp - 4]
call fcn.0041a1b9
add esp, 0x20
cmp dword [ebp - 0x30], edi
je 0x413ba8
push dword [ebp - 4]
call fcn.0041ab88
test eax, eax
pop ecx
jne 0x413d38
mov edi, dword [sym.imp.NSCRT.dll_strstr]
lea eax, [ebp - 0x14c]
mov ebx, 0x473018
push ebx
push eax
mov dword [ebp - 0x10], eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x413956
lea eax, [ebp - 0x14c]
push ebx
push eax
call edi
pop ecx
inc eax
pop ecx
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x10]
cmp byte [ebx], 0x5c
jne 0x413967
inc ebx
cmp byte [ebx], 0x5c
je 0x41395e
mov dword [ebp - 0x10], ebx
push ebx
call fcn.00417130
cmp byte [ebx], 0
pop ecx
mov edi, eax
je 0x413b42
test edi, edi
je 0x413b42
push 0x475ed4
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ed0
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ecc
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ec8
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ec4
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ec0
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ebc
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475eb8
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push str.maki
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x473a3c
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x473aec
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475eac
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ea8
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ea4
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475ea0
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e9c
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e98
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e94
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0
push edi
lea ecx, [ebp - 0x24]
call fcn.00402d5b
push dword [eax]
or dword [ebp - 0xc], 2
call fcn.0043384a
test eax, eax
pop ecx
jne 0x413b3e
push 0x475e90
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e8c
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push str.midi
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push str.mpeg
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e78
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e74
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x413b3e
push 0x475e70
push edi
call esi
test eax, eax
pop ecx
pop ecx
jne 0x413b42
mov bl, 1
jmp 0x413b44
xor bl, bl
test byte [ebp - 0xc], 2
je 0x413b5c
push dword [ebp - 0x24]
and dword [ebp - 0xc], 0xfffffffd
call dword [sym.imp.NSCRT.dll_free]
and dword [ebp - 0x24], 0
pop ecx
test bl, bl
je 0x413d38
xor ebx, ebx
push ebx
push dword [ebp - 0x10]
lea ecx, [ebp - 0x28]
call fcn.00402d5b
push dword [eax]
mov edi, 0x4865c0
push edi
lea eax, [ebp - 0x3a4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [ebp - 0x28]
call dword [sym.imp.NSCRT.dll_free]
lea eax, [ebp - 0x3a4]
push edi
push eax
mov dword [ebp - 0x28], ebx
call fcn.004135ab
add esp, 0xc
jmp 0x413c48
lea eax, [ebp - 0x14c]
dec eax
push eax
lea eax, [ebp - 0x14c]
push 0x475e6c
push eax
call fcn.00414b35
mov edi, eax
inc edi
push edi
call fcn.00417130
mov ebx, eax
push 0x475ec4
push ebx
call esi
add esp, 0x18
test eax, eax
je 0x413c09
push 0x475ecc
push ebx
call esi
test eax, eax
pop ecx
pop ecx
je 0x413c09
push 0x475ec8
push ebx
call esi
test eax, eax
pop ecx
pop ecx
je 0x413c09
push 0x475e68
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x413d38
push dword [ebp - 4]
call fcn.0041ab88
test eax, eax
pop ecx
jne 0x413d38
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00402d5b
push dword [eax]
lea eax, [ebp - 0x3a4]
push 0x4865c0
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [ebp - 0x2c]
call dword [sym.imp.NSCRT.dll_free]
and dword [ebp - 0x2c], 0
pop ecx
xor ebx, ebx
mov ecx, dword [ebp - 0x18]
neg ecx
push ebx
sbb ecx, ecx
mov eax, 0x40000000
and ecx, eax
or ecx, 0x80
push ecx
push 2
push ebx
push ebx
push eax
lea eax, [ebp - 0x3a4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x413d38
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x20], 1
xor eax, eax
cmp dword [ebp - 0x10], eax
push 0x800
sete al
mov ebx, eax
shl ebx, 0xb
lea ebx, [ebp + ebx - 0x15ac]
push ebx
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call fcn.0041a470
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x413cc3
push dword [ebp - 4]
call fcn.0041a69b
pop ecx
cmp dword [ebp - 0x18], 0
je 0x413d09
push 0xffffffffffffffff
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test edi, edi
jle 0x413d2f
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x48]
push eax
push 0
push edi
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x413d04
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x413d04
and dword [ebp - 0x20], 0
add dword [ebp - 0x1c], edi
jmp 0x413d25
test edi, edi
jle 0x413d2f
push 0
lea eax, [ebp - 0x34]
push eax
push edi
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x413d25
and dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x413c8c
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call fcn.0041a222
test eax, eax
pop ecx
je 0x4138e2
cmp dword [ebp - 0x18], 0
je 0x413d5e
cmp dword [ebp - 0x38], 0
je 0x413d5e
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call fcn.0041a8d3
pop ecx
jmp 0x413d6f
mov word [0x485028], ax
pop edi
pop esi
pop ebx
leave
ret