Function at 0x4a2179
Capabilities:
Check if file exists
Create directory
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x572e49
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x411a8
call fcn.005374e0
push esi
push edi
mov dword [ebp - 0x4118c], ecx
lea ecx, [ebp - 0x410f0]
call fcn.004e70a0
mov dword [ebp - 4], 0
call fcn.0055f60b
mov eax, dword [eax + 4]
mov dword [ebp - 0x410f8], eax
mov ecx, dword [0x5be480]
mov dword [ebp - 0x10], ecx
mov byte [ebp - 4], 1
mov edx, dword [0x5be480]
mov dword [ebp - 0x41100], edx
mov byte [ebp - 4], 2
mov eax, dword [0x5be480]
mov dword [ebp - 0x410fc], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x4113c], ecx
mov edx, dword [ebp - 0x4113c]
mov eax, dword [0x5be480]
mov dword [edx], eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x41140], ecx
mov edx, dword [ebp - 0x41140]
mov eax, dword [0x5be480]
mov dword [edx], eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x41144], ecx
mov edx, dword [ebp - 0x41144]
mov eax, dword [0x5be480]
mov dword [edx], eax
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x41148], ecx
mov edx, dword [ebp - 0x41148]
mov eax, dword [0x5be480]
mov dword [edx], eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x4114c], ecx
mov edx, dword [ebp - 0x4114c]
mov eax, dword [0x5be480]
mov dword [edx], eax
mov byte [ebp - 4], 4
push 0x5b6254
mov ecx, dword [ebp - 0x410f8]
add ecx, 0x13c
push ecx
lea edx, [ebp - 0x4111c]
push edx
call fcn.0054d5cd
mov dword [ebp - 0x41190], eax
mov eax, dword [ebp - 0x41190]
mov dword [ebp - 0x41194], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x41194]
push ecx
lea ecx, [ebp - 0x41100]
call fcn.0054d46f
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x4111c]
call fcn.0054d328
push 0x5b6280
mov edx, dword [ebp - 0x410f8]
add edx, 0x13c
push edx
lea eax, [ebp - 0x41124]
push eax
call fcn.0054d5cd
mov dword [ebp - 0x41150], eax
mov ecx, dword [ebp - 0x41150]
mov edx, dword [ecx]
mov dword [ebp - 0x41154], edx
mov eax, dword [ebp - 0x41154]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x41120], al
lea ecx, [ebp - 0x41124]
call fcn.0054d328
mov ecx, dword [ebp - 0x41120]
and ecx, 0xff
test ecx, ecx
je 0x4a2367
push 0x5b62a8
mov edx, dword [ebp - 0x410f8]
add edx, 0x13c
push edx
lea eax, [ebp - 0x41128]
push eax
call fcn.0054d5cd
mov dword [ebp - 0x41158], eax
mov ecx, dword [ebp - 0x41158]
mov edx, dword [ecx]
mov dword [ebp - 0x4115c], edx
push 0
mov eax, dword [ebp - 0x4115c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [ebp - 0x41128]
call fcn.0054d328
mov ecx, dword [ebp - 0x4118c]
call fcn.004a2d5e
mov ecx, dword [ebp - 0x41100]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x4a2391
mov edx, dword [ebp - 0x41100]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [0x5be480]
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 6
mov ecx, dword [0x5be480]
mov dword [ebp - 0x54], ecx
mov byte [ebp - 4], 7
mov word [ebp - 0x41104], 0xfeff
mov ecx, 0x10
mov esi, 0x5b62d0
lea edi, [ebp - 0x50]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [0x5b6310]
mov dword [ebp - 0x80], edx
mov eax, dword [0x5b6314]
mov dword [ebp - 0x7c], eax
mov cx, word [0x5b6318]
mov word [ebp - 0x78], cx
mov dword [ebp - 0x410f4], 0
jmp 0x4a23f9
mov edx, dword [ebp - 0x410f4]
add edx, 1
mov dword [ebp - 0x410f4], edx
mov eax, dword [ebp - 0x410f8]
mov ecx, dword [eax + 0x484]
mov dword [ebp - 0x41160], ecx
mov edx, dword [ebp - 0x410f4]
cmp edx, dword [ebp - 0x41160]
jge 0x4a273a
mov eax, dword [ebp - 0x410f4]
imul eax, eax, 0x1c
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x480]
add edx, eax
mov dword [ebp - 0x41164], edx
mov eax, dword [ebp - 0x41164]
mov ecx, dword [eax]
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x41164]
add edx, 4
push edx
lea ecx, [ebp - 0x70]
call fcn.0054d46f
mov eax, dword [ebp - 0x41164]
add eax, 8
push eax
lea ecx, [ebp - 0x6c]
call fcn.0054d46f
mov ecx, dword [ebp - 0x41164]
add ecx, 0xc
push ecx
lea ecx, [ebp - 0x68]
call fcn.0054d46f
mov edx, dword [ebp - 0x41164]
add edx, 0x10
push edx
lea ecx, [ebp - 0x64]
call fcn.0054d46f
mov eax, dword [ebp - 0x41164]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp - 0x41164]
add edx, 0x18
push edx
lea ecx, [ebp - 0x5c]
call fcn.0054d46f
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a24be
jmp 0x4a23ea
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x4d4]
mov dword [ebp - 0x41168], edx
mov eax, dword [ebp - 0x41168]
push eax
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x13c]
push edx
push str._sUtilitiesStartupStartup_d.reg
lea eax, [ebp - 0x410fc]
push eax
call fcn.0054ab7c
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp - 0x410fc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10e8], eax
cmp dword [ebp - 0x10e8], 0xffffffff
je 0x4a2597
mov dword [ebp - 0x10e4], 0
mov dword [ebp - 0x10e0], 0
push 0
lea edx, [ebp - 0x41110]
push edx
push 2
lea eax, [ebp - 0x41104]
push eax
mov ecx, dword [ebp - 0x10e8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [ebp - 0x50]
push edx
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
push 0x5b6360
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
push 0x5b6364
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0054d46f
push 0x5b636c
lea ecx, [ebp - 0x10]
call fcn.0054a808
mov dword [ebp - 0x41108], eax
mov edx, dword [ebp - 0x41108]
push edx
lea eax, [ebp - 0x4112c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0054a76e
mov dword [ebp - 0x41198], eax
mov ecx, dword [ebp - 0x41198]
mov dword [ebp - 0x4119c], ecx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x4119c]
push edx
lea ecx, [ebp - 0x10]
call fcn.0054d46f
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x4112c]
call fcn.0054d328
push ecx
mov ecx, esp
mov dword [ebp - 0x41130], esp
lea eax, [ebp - 0x10]
push eax
call fcn.0054d095
mov dword [ebp - 0x411a0], eax
lea ecx, [ebp - 0x410f0]
call fcn.004e7489
mov dword [ebp - 0x411a4], eax
mov ecx, dword [ebp - 0x411a4]
mov dword [ebp - 0x4110c], ecx
push 1
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x41134], esp
lea edx, [ebp - 0x70]
push edx
call fcn.0054d095
mov dword [ebp - 0x411a8], eax
mov eax, dword [ebp - 0x4110c]
push eax
lea ecx, [ebp - 0x410f0]
call fcn.004e75e4
mov dword [ebp - 0x411ac], eax
cmp dword [ebp - 0x411ac], 0
je 0x4a26ee
push 0x5b
lea ecx, [ebp - 0x410f0]
call fcn.004ec25c
mov ecx, dword [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
push 0x5b6370
lea ecx, [ebp - 0x410f0]
call fcn.004ebff8
mov edx, dword [ebp - 0x68]
push edx
lea ecx, [ebp - 0x410f0]
call fcn.004ec035
push 0x3d
lea ecx, [ebp - 0x410f0]
call fcn.004ec25c
mov eax, dword [ebp - 0x64]
push eax
lea ecx, [ebp - 0x410f0]
call fcn.004ec035
push 0xa
lea ecx, [ebp - 0x410f0]
call fcn.004ec25c
push 0xa
lea ecx, [ebp - 0x410f0]
call fcn.004ec25c
lea ecx, [ebp - 0x410f0]
call fcn.004ec2e8
mov ecx, dword [ebp - 0x10e8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x410f8]
add edx, 0x4cc
mov dword [ebp - 0x41170], edx
mov eax, dword [ebp - 0x41170]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x4116c], ecx
lea edx, [ebp - 0x410fc]
push edx
mov eax, dword [ebp - 0x4116c]
push eax
mov ecx, dword [ebp - 0x41170]
call fcn.0054c5b3
jmp 0x4a23ea
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x4d4]
mov dword [ebp - 0x41174], edx
cmp dword [ebp - 0x41174], 0
je 0x4a28ef
mov eax, dword [ebp - 0x41100]
mov ecx, dword [eax - 8]
mov dword [ebp - 0x41178], ecx
push 2
push 0
mov edx, dword [ebp - 0x41178]
push edx
lea ecx, [ebp - 0x41100]
call fcn.0054d76d
push eax
call fcn.004e6af1
add esp, 0xc
mov dword [ebp - 0x41114], eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x41100]
call fcn.0054d7bd
mov dword [ebp - 0x41118], 0
jmp 0x4a27b5
mov eax, dword [ebp - 0x41118]
add eax, 1
mov dword [ebp - 0x41118], eax
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x4d4]
mov dword [ebp - 0x4117c], edx
mov eax, dword [ebp - 0x41118]
cmp eax, dword [ebp - 0x4117c]
jge 0x4a28ab
mov ecx, dword [ebp - 0x410f8]
mov edx, dword [ecx + 0x4d0]
mov eax, dword [ebp - 0x41118]
lea ecx, [edx + eax*4]
push ecx
lea ecx, [ebp - 0x410fc]
call fcn.0054d46f
lea edx, [ebp - 0x410fc]
push edx
lea ecx, [ebp - 0x54]
call fcn.004b257a
mov eax, dword [ebp - 0x410fc]
mov ecx, dword [eax - 8]
mov dword [ebp - 0x41180], ecx
lea edx, [ebp - 0x41138]
push edx
lea ecx, [ebp - 0x54]
call fcn.004b2df7
mov dword [ebp - 0x411b0], eax
mov eax, dword [ebp - 0x411b0]
mov dword [ebp - 0x41184], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x41184]
mov edx, dword [ecx]
mov dword [ebp - 0x41188], edx
push 2
push 0
mov eax, dword [ebp - 0x41180]
push eax
lea ecx, [ebp - 0x410fc]
call fcn.0054d76d
push eax
mov ecx, dword [ebp - 0x41188]
push ecx
mov edx, dword [ebp - 0x41114]
push edx
call fcn.004e6c0e
add esp, 0x14
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x41138]
call fcn.0054d328
mov eax, dword [ebp - 0x410fc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x4a28a6
mov ecx, dword [ebp - 0x410fc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4a27a6
mov edx, dword [ebp - 0x41114]
push edx
call fcn.004e6e20
add esp, 4
and eax, 0xff
test eax, eax
je 0x4a28da
mov eax, dword [ebp - 0x41114]
push eax
call fcn.004e6d77
add esp, 4
mov dword [ebp - 0x411b4], eax
jmp 0x4a28ef
mov ecx, dword [ebp - 0x41114]
push ecx
call fcn.004dff55
add esp, 4
mov dword [ebp - 0x411b4], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x54]
call fcn.0054d328
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x58]
call fcn.0054d328
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x5c]
call fcn.0054d328
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x64]
call fcn.0054d328
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x68]
call fcn.0054d328
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x6c]
call fcn.0054d328
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x70]
call fcn.0054d328
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x410fc]
call fcn.0054d328
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x41100]
call fcn.0054d328
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0054d328
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x410f0]
call fcn.004e71cb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret