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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1964
call fcn.00461410
and dword [ebp - 0xc], 0
cmp byte [0x476ad0], 0
push ebx
push esi
push edi
je 0x410399
mov ebx, 0x476ad0
push 0x46a938
mov esi, ebx
call fcn.00413b30
mov edi, dword [sym.imp.NSCRT.dll__stricmp]
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x40fdfb
push 0x468394
call fcn.00413b30
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x40fdfb
push 0x468390
call fcn.00413b30
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x40fdfb
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecA]
test eax, eax
push ebx
je 0x40fde7
push 0x475a50
push 0x475b58
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
jmp 0x4103a0
push 0x104
push 0x475b58
call fcn.004025ff
jmp 0x4103a0
mov esi, 0x4768c0
push esi
push 0x104
push 0x475b58
call fcn.004025ff
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecA]
test eax, eax
push ebx
lea eax, [ebp - 0x554]
je 0x40fe39
push 0x475a50
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
jmp 0x40fe44
push 0x410
push eax
call fcn.004025ff
xor ecx, ecx
lea eax, [ebp - 0x554]
call fcn.0041baf0
mov esi, eax
test esi, esi
mov dword [ebp - 4], esi
je 0x4103a0
and dword [ebp - 0x20], 0
call fcn.0041c0e0
test eax, eax
jne 0x40ff09
push ebx
mov ebx, 0x410
push ebx
lea eax, [ebp - 0x964]
push eax
call fcn.004025ff
lea eax, [ebp - 0x964]
push 0x2e
push eax
call dword [sym.imp.NSCRT.dll_strchr]
xor esi, esi
cmp eax, esi
pop ecx
pop ecx
je 0x40fe9c
mov byte [eax], 0
push str._skin.xml
push ebx
lea eax, [ebp - 0x964]
push eax
call fcn.0040380b
push esi
push esi
push esi
push esi
push 0x104
lea eax, [ebp - 0x144]
push eax
push esi
push esi
mov esi, dword [ebp - 4]
mov eax, esi
call fcn.0041bd50
lea eax, [ebp - 0x144]
push str.skin.xml
push eax
call edi
add esp, 0x28
test eax, eax
je 0x40ff02
lea eax, [ebp - 0x964]
push eax
lea eax, [ebp - 0x144]
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x40ff02
call fcn.0041c130
test eax, eax
jne 0x40ff09
xor esi, esi
jmp 0x40feae
mov dword [ebp - 0x20], 1
mov esi, dword [ebp - 4]
call fcn.0041c0e0
test eax, eax
jne 0x41038f
xor esi, esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
sbb eax, eax
neg eax
mov dword [ebp - 0x10], eax
je 0x40ff43
push esi
push 1
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], esi
xor esi, esi
cmp dword [ebp - 0x10], esi
je 0x40ff53
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
push esi
push esi
push esi
push 0x104
lea eax, [ebp - 0x144]
push eax
mov eax, dword [ebp - 4]
push esi
push esi
call fcn.0041bd50
add esp, 0x20
cmp dword [ebp - 0x20], esi
je 0x4101f3
mov ecx, dword [ebp - 4]
call fcn.0041c630
test eax, eax
jne 0x41036a
mov ebx, dword [sym.imp.NSCRT.dll_strstr]
lea eax, [ebp - 0x144]
mov esi, 0x467f00
push esi
push eax
mov dword [ebp - 8], eax
call ebx
test eax, eax
pop ecx
pop ecx
je 0x40ffb9
lea eax, [ebp - 0x144]
push esi
push eax
call ebx
pop ecx
inc eax
pop ecx
mov dword [ebp - 8], eax
jmp 0x40ffbc
mov eax, dword [ebp - 8]
cmp byte [eax], 0x5c
jne 0x40ffca
inc eax
cmp byte [eax], 0x5c
je 0x40ffc1
mov dword [ebp - 8], eax
mov esi, eax
call fcn.00413b30
mov esi, dword [ebp - 8]
cmp byte [esi], 0
mov ebx, eax
je 0x4101a9
test ebx, ebx
je 0x4101a9
push 0x46a91c
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a918
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a914
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a910
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a90c
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a908
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a904
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a900
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push str.maki
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x4682a4
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x468308
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8f4
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8f0
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8ec
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8e8
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8e4
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8e0
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8dc
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
or dword [ebp - 0xc], 1
push 0
push ebx
call fcn.004026c1
push eax
mov dword [ebp - 0x28], eax
call fcn.00431882
add esp, 0xc
test eax, eax
jne 0x4101a5
push 0x46a8d8
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8d4
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push str.midi
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push str.mpeg
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8c0
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8bc
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x4101a5
push 0x46a8b8
push ebx
call edi
test eax, eax
pop ecx
pop ecx
jne 0x4101a9
mov bl, 1
jmp 0x4101ab
xor bl, bl
test byte [ebp - 0xc], 1
je 0x4101c3
push dword [ebp - 0x28]
and dword [ebp - 0xc], 0xfffffffe
call dword [sym.imp.NSCRT.dll_free]
and dword [ebp - 0x28], 0
pop ecx
test bl, bl
je 0x41036a
push esi
mov esi, 0x4768c0
push esi
lea eax, [ebp - 0x554]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
lea eax, [ebp - 0x554]
push esi
push eax
call fcn.0040fcb7
pop ecx
pop ecx
jmp 0x410276
lea eax, [ebp - 0x144]
dec eax
push eax
mov ebx, 0x46a93c
lea eax, [ebp - 0x144]
call fcn.00411743
mov esi, eax
inc esi
call fcn.00413b30
mov ebx, eax
mov dword [esp], 0x46a90c
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x410253
push 0x46a914
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x410253
push 0x46a910
push ebx
call edi
test eax, eax
pop ecx
pop ecx
je 0x410253
push 0x46a8b4
push ebx
call edi
test eax, eax
pop ecx
pop ecx
jne 0x41036a
mov ecx, dword [ebp - 4]
call fcn.0041c630
test eax, eax
jne 0x41036a
push esi
push 0x4768c0
lea eax, [ebp - 0x554]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov edx, dword [ebp - 0x10]
xor ecx, ecx
neg edx
push ecx
sbb edx, edx
mov eax, 0x40000000
and edx, eax
or edx, 0x80
push edx
push 2
push ecx
push ecx
push eax
lea eax, [ebp - 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x41036a
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], 1
xor eax, eax
cmp dword [ebp - 8], ebx
mov ecx, 0x800
sete al
mov dword [ebp - 8], eax
shl eax, 0xb
lea eax, [ebp + eax - 0x1964]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.0041c650
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
jne 0x4102f6
mov ebx, dword [ebp - 4]
call fcn.0041c910
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
je 0x41033b
push 0xffffffffffffffff
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp esi, ebx
jle 0x410361
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
push eax
push ebx
push esi
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410336
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x410336
mov dword [ebp - 0x14], ebx
add dword [ebp - 0x18], esi
jmp 0x410358
cmp esi, ebx
jle 0x410361
push ebx
lea eax, [ebp - 0x2c]
push eax
push esi
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410358
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x14], ebx
jne 0x4102be
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 4]
call fcn.0041c130
test eax, eax
je 0x40ff43
cmp dword [ebp - 0x10], 0
je 0x41038f
cmp dword [ebp - 0x30], 0
je 0x41038f
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
call fcn.0041bd10
jmp 0x4103a0
mov byte [0x475b58], 0
pop edi
pop esi
pop ebx
leave
ret