Function at 0x409910
Capabilities:
Check if file exists
Create directory
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x432bba
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x43f090]
xor eax, esp
mov dword [esp + 0x280], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43f090]
xor eax, esp
push eax
lea eax, [esp + 0x29c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2ac]
mov dword [esp + 0x34], eax
mov eax, dword [eax + 0xb4]
sub eax, 0x10
call fcn.004049c0
lea ebp, [eax + 0x10]
mov dword [esp + 0x28], ebp
lea eax, [esp + 0x28]
mov edi, 0x442668
mov dword [esp + 0x2a4], 0
call fcn.00403de0
lea eax, [esp + 0x48]
push eax
call fcn.00402bb0
add esp, 4
push 0xa
push str.Setup.sfz
lea ecx, [esp + 0x50]
push ecx
mov byte [esp + 0x2b0], 1
call fcn.00404850
mov edx, dword [0x4418c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4418c4
call eax
add eax, 0x10
mov dword [esp + 0x50], eax
mov byte [esp + 0x2a4], 2
push 0x438c60
mov ebx, 3
lea eax, [esp + 0x54]
mov dword [esp + 0x58], 0x67
call fcn.004029a0
mov esi, dword [esp + 0x48]
push esi
lea eax, [esp + 0x54]
call fcn.0040b950
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 2
mov bl, bl
push esi
mov byte [esp + 0x2a8], bl
call fcn.00416c00
add esp, 4
mov dword [esp + 0x40], eax
test eax, eax
jne 0x409a8c
lea ebx, [esp + 0x40]
mov byte [esp + 0x2a4], 2
call fcn.004176a0
mov byte [esp + 0x2a4], 1
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x2a4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2a4], 0xffffffff
lea eax, [ebp - 0x10]
jmp 0x40a19c
push 0x5c
push ebp
call fcn.0041fcfe
add esp, 8
test eax, eax
je 0x409ae8
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x409ae8
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x28]
call fcn.0040a8e0
lea edi, [esp + 0x28]
mov byte [esp + 0x2a4], 4
call fcn.00403de0
mov byte [esp + 0x2a4], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ae8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x30]
push 0
push 6
push 0x428
push edx
mov dword [esp + 0x5c], 6
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x40]
push eax
call fcn.00417720
xor edx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], edx
test eax, eax
jle 0x40a10b
mov dword [esp + 0x38], edx
mov ecx, dword [esp + 0x40]
push ecx
lea ecx, [esp + 0x68]
call fcn.00416c70
add esp, 4
test eax, eax
jne 0x40a10b
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.004049c0
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ebx, [esp + 0x1c]
mov byte [esp + 0x2a4], 5
call fcn.00403d40
push 1
push 0x43653c
mov edx, ebx
push edx
call fcn.00404850
lea eax, [esp + 0x68]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409b80
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.00404850
lea edx, [esp + 0x1c]
push edx
call fcn.0040a720
lea ebx, [esp + 0x1c]
call fcn.00403d40
test byte [esp + 0x270], 0x10
je 0x409be3
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409bdb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40a1ee
lea eax, [esi - 0x10]
jmp 0x40a00a
mov edx, dword [0x4418c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4418c4
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
lea edi, [esp + 0x18]
mov byte [esp + 0x2a4], 6
call fcn.00403de0
mov esi, dword [esp + 0x18]
push 0x5c
push esi
call fcn.0041fcfe
add esp, 8
test eax, eax
je 0x409c77
sub eax, esi
sar eax, 1
test eax, eax
jle 0x409c77
lea ecx, [esp + 0x5c]
mov edx, edi
call fcn.0040a8e0
mov byte [esp + 0x2a4], 7
call fcn.00403de0
mov byte [esp + 0x2a4], 6
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004030b0
add esp, 4
lea esi, [esp + 0x18]
call fcn.00402840
mov edx, dword [0x4418c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4418c4
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x2a4], 8
mov ebp, dword [esp + 0x1c]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.00404c80
mov bl, 9
mov byte [esp + 0x2a4], bl
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.SHLWAPI.dll_StrCmpIW]
push str.KDeskBand64.dll
push edx
call esi
test eax, eax
je 0x409ce9
mov eax, dword [esp + 0x30]
push str.KDeskBand.dll
push eax
call esi
test eax, eax
jne 0x409d86
lea eax, [ebp - 0x10]
call fcn.004049c0
add eax, 0x10
mov dword [esp + 0x24], eax
push ebp
push str._s.delete
lea edi, [esp + 0x2c]
mov byte [esp + 0x2ac], 0xa
call fcn.00403fc0
mov esi, dword [esp + 0x2c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 8
push esi
call edi
test eax, eax
je 0x409d3a
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409d3a
push 1
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x409d4c
push ebp
call edi
test eax, eax
je 0x409d63
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409d63
lea eax, [esp + 0x1c]
lea edi, [esp + 0x20]
call fcn.00403de0
mov edx, str..replace
call fcn.00403d00
lea eax, [esi - 0x10]
mov byte [esp + 0x2a4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor edi, edi
mov dword [esp + 0x24], edi
mov byte [esp + 0x2a4], 0xb
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x20]
cmp dword [ebx - 0xc], edi
jne 0x409da5
lea eax, [esp + 0x1c]
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x409dcc
call fcn.0040b2e0
jmp 0x409dda
mov edi, eax
mov dword [esp + 0x24], edi
test eax, eax
jne 0x409ef3
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x20
je 0x409df2
call esi
cmp eax, 5
jne 0x409ed8
cmp dword [ebx - 0xc], 0
jne 0x409ed8
lea eax, [esp + 0x1c]
lea edi, [esp + 0x18]
call fcn.00403de0
mov ebx, dword [esp + 0x18]
push 0x2e
push ebx
call fcn.0041fcfe
add esp, 8
test eax, eax
je 0x409e58
sub eax, ebx
sar eax, 1
test eax, eax
jle 0x409e58
lea ecx, [esp + 0x60]
mov edx, edi
call fcn.0040a8e0
mov byte [esp + 0x2a4], 0xc
call fcn.00403de0
lea ecx, [esp + 0x60]
mov byte [esp + 0x2a4], 0xb
call fcn.00402a80
mov ebx, edi
call fcn.00403d40
mov ebx, dword [esp + 0x18]
mov edx, dword [0x4418c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4418c4
call eax
add eax, 0x10
mov dword [esp + 0x58], eax
mov byte [esp + 0x2a4], 0xd
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push ebx
push str._s.delete_d
lea edi, [esp + 0x64]
call fcn.00403fc0
mov esi, dword [esp + 0x64]
add esp, 0xc
push 1
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esp + 0x24]
push ecx
mov eax, ebp
call fcn.0040b300
lea eax, [esi - 0x10]
mov byte [esp + 0x2a4], 0xb
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409ece
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x409ef7
jmp 0x409edc
mov ebx, dword [esp + 0x18]
mov dword [0x442644], 0xc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x442648], eax
jmp 0x409ef7
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40a048
cmp dword [eax], 1
jne 0x40a1df
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x3c]
push edi
push eax
call fcn.004169f0
mov dword [0x442654], eax
test eax, eax
jne 0x40a052
cmp dword [ebx - 0xc], eax
je 0x409f41
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409f41
push 5
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, dword [esp + 0x20]
cmp dword [esi - 0xc], 0
je 0x409f5b
cmp dword [ebp - 0xc], 0
je 0x409f5b
push 5
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [esp + 0x38]
cdq
idiv dword [esp + 0x2c]
cmp eax, dword [esp + 0x4c]
je 0x409f84
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x30]
push 0
push eax
push 0x428
push edx
mov dword [esp + 0x5c], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
je 0x409f97
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x2a4], 8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409fbf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x2a4], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409fe3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x2a4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a007
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x2a4], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a02b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x3c]
add dword [esp + 0x38], 0x5a
inc edx
cmp edx, dword [esp + 0x2c]
mov dword [esp + 0x3c], edx
jl 0x409b27
jmp 0x40a10b
mov dword [0x442654], 0x10000
mov dword [0x442644], 0xca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x442648], eax
test edi, edi
je 0x40a072
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x2a4], 8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a09a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2a4], 6
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x2a4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 0xfffffff0
mov byte [esp + 0x2a4], 3
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a10b
mov ecx, dword [ebp]
push ebp
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 0xac]
test eax, eax
je 0x40a129
push 0
push 0
push 0x423
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageW]
lea ebx, [esp + 0x40]
mov byte [esp + 0x2a4], 2
call fcn.004176a0
mov byte [esp + 0x2a4], 1
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a162
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2a4], 0
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a18a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2a4], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a1b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x29c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.0041e5bb
add esp, 0x294
ret 4
mov dword [0x442654], 0x80000
jmp 0x40a052
add esi, 0xfffffff0
mov byte [esp + 0x2a4], 3
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a10b
mov ecx, dword [esi]
push esi
jmp 0x40a104