Function at 0x551b20
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x8a4
push ebx
push ebp
mov ebx, ecx
xor ebp, ebp
test ebx, ebx
push edi
mov edi, eax
je 0x551b4d
test edi, edi
je 0x551b4d
mov eax, dword [esp + 0x8b8]
test eax, eax
je 0x551b4d
mov eax, dword [esp + 0x8bc]
test eax, eax
jne 0x551b5e
pop edi
pop ebp
mov eax, 0x57
pop ebx
add esp, 0x8a4
ret 0xc
push esi
push 0x80
lea esi, [esp + 0x18]
call fcn.00557d80
mov eax, esi
push eax
push ebx
lea ecx, [esp + 0x1a8]
push str._s_s_
push ecx
call fcn.006238e3
mov edx, esi
push edx
lea eax, [esp + 0x1b4]
push eax
lea ecx, [esp + 0xb0]
push str._s_s
push ecx
call fcn.006238e3
mov edx, esi
push edx
lea eax, [esp + 0x4dc]
push str.Name_s_n
push eax
call fcn.006238e3
push 0x80
lea eax, [esp + 0x2d8]
lea edi, [esp + 0x4e8]
call fcn.00557dc0
mov ecx, esi
push ecx
push ebx
lea edx, [esp + 0x3e8]
push 0x66d8c8
push edx
call fcn.006238e3
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x44
push ebx
call esi
cmp eax, 0xffffffff
jne 0x551c15
push 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call ebx
test eax, eax
jne 0x551c1b
pop esi
pop edi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x8a4
ret 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x3ac]
push eax
call esi
cmp eax, 0xffffffff
je 0x551c2f
mov ebp, 1
mov eax, dword [esp + 0x8b8]
dec eax
je 0x551c8f
sub eax, 2
je 0x551c53
dec eax
je 0x551c8f
pop esi
pop edi
pop ebp
mov eax, 0x57
pop ebx
add esp, 0x8a4
ret 0xc
test ebp, ebp
je 0x551c03
push 0
push 0x80
push 2
push 0
push 0
push 0
lea ecx, [esp + 0xac]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x551c03
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8a4
ret 0xc
test ebp, ebp
jne 0x551d0d
push ebp
lea edx, [esp + 0x1a0]
push edx
call ebx
test eax, eax
je 0x551c03
xor eax, eax
jmp 0x551cb0
mov cl, byte [esp + eax + 0x19c]
mov byte [esp + eax + 0x2a4], cl
inc eax
test cl, cl
jne 0x551cb0
lea edi, [esp + 0x2a4]
dec edi
jmp 0x551cd0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x551cd0
mov eax, dword [str.checkpoints_]
mov ecx, dword [0x670a2c]
mov edx, dword [0x670a30]
mov dword [edi], eax
mov al, byte [0x670a34]
mov dword [edi + 4], ecx
push 0
lea ecx, [esp + 0x2a8]
mov dword [edi + 8], edx
push ecx
mov byte [edi + 0xc], al
call ebx
test eax, eax
je 0x551c03
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea edx, [esp + 0xac]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x551c03
lea eax, [esp + 0x94]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x551d42
sub eax, edx
push 0
mov edi, eax
lea eax, [esp + 0x14]
push eax
push edi
lea ecx, [esp + 0xa0]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, dword [esp + 0x10]
jne 0x551c03
mov edx, dword [esp + 0x8c0]
mov ecx, dword [esp + 0x8bc]
push edx
lea eax, [esp + 0x1a0]
push eax
push ecx
call fcn.00623ce0
add esp, 0xc
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8a4
ret 0xc