Function at 0x540030
Capabilities:
Copy file
Enumerate files on windows

Disassembly:
sub esp, 0x448
push ebp
push edi
mov edi, dword [esp + 0x454]
push str.blam.sav
push edi
push str._s_s
lea eax, [esp + 0x1c]
push 0xff
push eax
call fcn.005c8b3d
push str.blam.sav
push esi
push str._s_s
lea ecx, [esp + 0x130]
push 0xff
push ecx
call fcn.005c8b3d
mov ebp, dword [sym.imp.KERNEL32.dll_CopyFileA]
add esp, 0x28
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x118]
push eax
mov byte [esp + 0x11b], 0
mov byte [esp + 0x21b], 0
call ebp
test al, al
je 0x540334
push str.savegame.bin
push edi
push str._s_s
lea ecx, [esp + 0x1c]
push 0xff
push ecx
call fcn.005c8b3d
push str.savegame.bin
push esi
push str._s_s
lea edx, [esp + 0x130]
push 0xff
push edx
call fcn.005c8b3d
add esp, 0x28
push 0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x118]
push ecx
mov byte [esp + 0x11b], 0
mov byte [esp + 0x21b], 0
call ebp
test al, al
mov byte [esp + 0xb], al
je 0x540334
lea edx, [esp + 0x10]
push 0x2e
push edx
call fcn.005c8cd0
add esp, 8
test eax, eax
je 0x540125
mov byte [eax], 0
lea edi, [esp + 0x10]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x540130
mov eax, dword [str..sav]
mov cl, byte [0x6101a8]
lea edx, [esp + 0x110]
mov dword [edi], eax
push 0x2e
push edx
mov byte [edi + 4], cl
call fcn.005c8cd0
add esp, 8
test eax, eax
je 0x540161
mov byte [eax], 0
lea edi, [esp + 0x110]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x540170
mov eax, dword [str..sav]
mov cl, byte [0x6101a8]
push ebx
push 0
mov dword [edi], eax
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x11c]
push eax
mov byte [edi + 4], cl
call ebp
mov bl, al
test bl, bl
je 0x54032f
push esi
push str._scheckpoints.sav
lea ecx, [esp + 0x35c]
push 0xff
push ecx
call fcn.005c8b3d
add esp, 0x10
lea edx, [esp + 0x214]
push edx
lea eax, [esp + 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x540272
jmp 0x5401f0
mov edi, dword [esp + 0x458]
lea ecx, [esp + 0x240]
push ecx
push edi
push str._scheckpoints_s
lea edx, [esp + 0x20]
push 0xff
push edx
call fcn.005c8b3d
lea eax, [esp + 0x254]
push eax
push esi
push str._scheckpoints_s
lea ecx, [esp + 0x134]
push 0xff
push ecx
call fcn.005c8b3d
add esp, 0x28
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x11c]
push eax
call ebp
mov bl, al
test bl, bl
je 0x540265
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x214]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x5401f0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x540279
mov edi, dword [esp + 0x458]
test bl, bl
je 0x54032f
push esi
push str._scheckpoints.bin
lea ecx, [esp + 0x35c]
push 0xff
push ecx
call fcn.005c8b3d
add esp, 0x10
lea edx, [esp + 0x214]
push edx
lea eax, [esp + 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x54032f
lea esp, [esp]
lea ecx, [esp + 0x240]
push ecx
push edi
push str._scheckpoints_s
lea edx, [esp + 0x20]
push 0xff
push edx
call fcn.005c8b3d
lea eax, [esp + 0x254]
push eax
push esi
push str._scheckpoints_s
lea ecx, [esp + 0x134]
push 0xff
push ecx
call fcn.005c8b3d
add esp, 0x28
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x11c]
push eax
call ebp
test al, al
je 0x540328
lea ecx, [esp + 0x214]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x5402c0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, byte [esp + 0xf]
pop ebx
pop edi
pop ebp
add esp, 0x448
ret