Function at 0x410d70
Capabilities:
Check if file exists
Delete file
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4614b0
mov eax, dword fs:[0]
push eax
sub esp, 0x7e4
mov eax, dword [0x47c824]
xor eax, esp
mov dword [esp + 0x7e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47c824]
xor eax, esp
push eax
lea eax, [esp + 0x7f8]
mov dword fs:[0], eax
mov dword [esp + 0x800], 1
call fcn.004241d0
mov eax, dword [eax + 4]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x2c], eax
je 0x410def
sub esp, 0x1c
mov edi, esp
mov dword [esp + 0x34], esp
push 6
push ecx
call fcn.00405940
add esp, 4
call fcn.00407270
call fcn.0040cad0
mov eax, dword [esp + 0x828]
mov ebx, 0x10
cmp dword [esp + 0x83c], ebx
jae 0x410e0b
lea eax, [esp + 0x828]
push eax
call fcn.00443d48
add esp, 4
lea ecx, [esp + 0x84]
push ecx
call fcn.00415770
mov dword [esp + 0x134], ebp
mov dword [esp + 0xcc], 0x4184c0
mov dword [esp + 0xd0], 0x4184f0
mov byte [esp + 0x800], 2
cmp dword [esp + 0x820], ebx
mov ecx, dword [esp + 0x80c]
jae 0x410e5d
lea ecx, [esp + 0x80c]
lea edx, [esp + 0x84]
push edx
call fcn.00415930
mov esi, eax
cmp esi, ebp
je 0x410f35
push 0x1ff
lea eax, [esp + 0x1f9]
push ebp
push eax
mov byte [esp + 0x200], 0
call fcn.00445a00
mov eax, dword [esp + 0x818]
add esp, 0xc
cmp dword [esp + 0x820], ebx
jae 0x410ea9
lea eax, [esp + 0x80c]
push esi
push eax
lea ecx, [esp + 0x1fc]
push str.OpenReadMode_fail_:_s_code_d
push ecx
call fcn.004437c1
add esp, 0x10
lea edx, [esp + 0x1f4]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
cmp dword [esp + 0x820], ebx
jb 0x410efb
mov eax, dword [esp + 0x80c]
push eax
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x83c], ebx
mov dword [esp + 0x820], 0xf
mov dword [esp + 0x81c], ebp
mov byte [esp + 0x80c], 0
jb 0x410f2e
mov ecx, dword [esp + 0x828]
push ecx
call fcn.00420ede
add esp, 4
xor eax, eax
jmp 0x4115f0
lea edx, [esp + 0x14]
push edx
push ebp
push ebp
lea eax, [esp + 0x90]
mov dword [esp + 0x20], ebp
call fcn.00416fb0
mov edi, dword [esp + 0x14]
cmp edi, ebp
jne 0x410fc9
push str.file_header_count_is_0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
cmp dword [esp + 0x820], ebx
jb 0x410f8c
mov eax, dword [esp + 0x80c]
push eax
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x83c], ebx
mov dword [esp + 0x820], 0xf
mov dword [esp + 0x81c], ebp
mov byte [esp + 0x80c], 0
jb 0x410fbf
mov ecx, dword [esp + 0x828]
push ecx
call fcn.00420ede
add esp, 4
mov eax, 2
jmp 0x4115f0
xor ecx, ecx
mov eax, edi
mov edx, 0x5c
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00420ee3
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
mov byte [esp + 0x800], 3
je 0x41100c
push fcn.004107c0
push edi
push 0x5c
push esi
call fcn.00411830
mov ebp, esi
mov dword [esp + 0x1c], esi
jmp 0x411012
xor ebp, ebp
mov dword [esp + 0x1c], ebp
lea eax, [esp + 0x14]
push eax
push edi
push ebp
lea eax, [esp + 0x90]
mov byte [esp + 0x80c], 2
call fcn.00416fb0
test eax, eax
je 0x411106
push 0x1ff
lea ecx, [esp + 0x1f9]
push 0
push ecx
mov byte [esp + 0x200], 0
call fcn.00445a00
mov eax, dword [esp + 0x818]
add esp, 0xc
cmp dword [esp + 0x820], ebx
jae 0x41106b
lea eax, [esp + 0x80c]
push eax
lea edx, [esp + 0x1f8]
push str.get_file_header_info_fail_file__s
push edx
call fcn.004437c1
add esp, 0xc
lea eax, [esp + 0x1f4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebp
call fcn.00420ede
add esp, 4
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
cmp dword [esp + 0x820], ebx
jb 0x4110c5
mov ecx, dword [esp + 0x80c]
push ecx
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x83c], ebx
mov dword [esp + 0x820], 0xf
mov dword [esp + 0x81c], 0
mov byte [esp + 0x80c], 0
jb 0x4110fc
mov edx, dword [esp + 0x828]
push edx
call fcn.00420ede
add esp, 4
mov eax, 3
jmp 0x4115f0
lea eax, [esp + 0x824]
push eax
mov edi, str.data.pak
lea esi, [esp + 0x50]
call fcn.00402620
add esp, 4
mov byte [esp + 0x800], 4
cmp dword [esp + 0x64], ebx
mov eax, dword [esp + 0x50]
jae 0x411135
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x411157
cmp dword [esp + 0x64], ebx
mov eax, dword [esp + 0x50]
jae 0x41114e
lea eax, [esp + 0x50]
push eax
call fcn.00420d40
add esp, 4
lea ecx, [esp + 0x13c]
push ecx
call fcn.00415770
xor esi, esi
mov dword [esp + 0x1ec], esi
mov dword [esp + 0x184], 0x4184c0
mov dword [esp + 0x188], 0x4184f0
mov byte [esp + 0x800], 5
cmp dword [esp + 0x64], ebx
mov eax, dword [esp + 0x50]
jae 0x411199
lea eax, [esp + 0x50]
push eax
lea edx, [esp + 0x140]
push edx
call fcn.004163b0
cmp eax, esi
je 0x411209
push str.data.pak_write_mode_open_fail_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
lea ecx, [esp + 0x4c]
call fcn.004014e0
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
lea ecx, [esp + 0x808]
call fcn.004014e0
lea ecx, [esp + 0x824]
call fcn.004014e0
mov eax, 4
jmp 0x4115f0
push 0x3ff
lea eax, [esp + 0x3f9]
push esi
push eax
mov byte [esp + 0x400], 0
call fcn.00445a00
add esp, 0xc
xor ebx, ebx
cmp dword [esp + 0x14], esi
mov dword [esp + 0x24], esi
jle 0x411509
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x20], 1
add ebp, 1
jmp 0x411250
cmp dword [0x481228], 2
mov esi, 0x10
je 0x411618
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x88]
xor eax, eax
push edx
lea edx, [esp + 0x20]
mov ecx, ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], eax
call fcn.00415bd0
mov edi, eax
test edi, edi
mov dword [esp + 0x18], edi
je 0x4116be
push 5
push str.data_
push ebp
call fcn.00443d74
add esp, 0xc
test eax, eax
lea ecx, [esp + 0x68]
jne 0x4113d3
push ebp
call fcn.00401470
lea ecx, [esi - 0xb]
push 0xffffffffffffffff
lea esi, [esp + 0x34]
lea edx, [esp + 0x6c]
mov byte [esp + 0x804], 6
call fcn.0040b580
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x74]
mov byte [esp + 0x80c], 7
call fcn.004015b0
mov ecx, esi
mov byte [esp + 0x800], 6
call fcn.004014e0
cmp dword [esp + 0x80], 0x10
mov ecx, dword [esp + 0x6c]
jae 0x411305
lea ecx, [esp + 0x6c]
mov eax, dword [esp + 0x28]
push eax
push edi
lea edx, [esp + 0x144]
push edx
call fcn.00416bc0
test eax, eax
je 0x411446
push 0x1ff
lea edx, [esp + 0x1f9]
push 0
push edx
mov byte [esp + 0x200], 0
call fcn.00445a00
imul ebx, ebx, 0x5c
mov esi, dword [esp + 0x28]
add esp, 0xc
lea eax, [ebx + esi + 1]
push eax
lea ecx, [esp + 0x1f8]
push str.pak_data_add_file_fail_file__s
push ecx
call fcn.004437c1
add esp, 0xc
lea edx, [esp + 0x1f4]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call fcn.00420ede
add esp, 4
lea ecx, [esp + 0x68]
call fcn.004014e0
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
lea ecx, [esp + 0x4c]
call fcn.004014e0
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
lea ecx, [esp + 0x808]
call fcn.004014e0
lea ecx, [esp + 0x824]
call fcn.004014e0
mov eax, 6
jmp 0x4115f0
push 0x47dcf0
call fcn.004014b0
lea eax, [esp + 0x68]
push eax
mov edx, ebp
mov byte [esp + 0x804], 8
call fcn.004026f0
cmp dword [esp + 0x80], esi
mov ecx, dword [esp + 0x6c]
jae 0x411402
lea ecx, [esp + 0x6c]
call fcn.00410710
cmp dword [esp + 0x80], esi
mov eax, dword [esp + 0x6c]
jae 0x411418
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x80], esi
mov eax, dword [esp + 0x6c]
jae 0x411430
lea eax, [esp + 0x6c]
mov ecx, dword [esp + 0x28]
push ecx
push edi
call fcn.004156c0
add esp, 8
test eax, eax
jne 0x411768
lea ecx, [esp + 0x68]
mov byte [esp + 0x800], 5
call fcn.004014e0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x20], edx
mov esi, eax
je 0x411472
sub eax, dword [esp + 0x24]
cmp eax, 0x32
jbe 0x4114e2
push 8
push ecx
call fcn.00405940
add esp, 4
lea edi, [esp + 0x34]
call fcn.00407270
cmp dword [eax + 0x18], 0x10
jb 0x411491
mov eax, dword [eax + 4]
jmp 0x411494
add eax, 4
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push ecx
push edx
push eax
lea eax, [esp + 0x400]
push eax
call fcn.004437c1
add esp, 0x10
lea ecx, [esp + 0x30]
call fcn.004014e0
cmp dword [esp + 0x2c], 0
je 0x4114da
sub esp, 0x1c
lea edx, [esp + 0x410]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.00401470
call fcn.0040cad0
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], esi
push edi
lea eax, [esp + 0x140]
push eax
call fcn.00416030
add dword [esp + 0x20], 1
add ebx, 1
add ebp, 0x5c
cmp ebx, dword [esp + 0x14]
jl 0x411250
mov ebp, dword [esp + 0x1c]
lea ecx, [esp + 0x13c]
push ecx
call fcn.00416770
lea esi, [esp + 0x84]
call fcn.00416060
push ebp
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x2c], 0
je 0x411550
sub esp, 0x1c
mov edi, esp
mov dword [esp + 0x34], esp
push 7
push ecx
call fcn.00405940
add esp, 4
call fcn.00407270
call fcn.0040cad0
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
mov edi, 0x10
cmp dword [esp + 0x64], edi
jb 0x41157c
mov edx, dword [esp + 0x50]
push edx
call fcn.00420ede
add esp, 4
xor ebx, ebx
mov esi, 0xf
lea ecx, [esp + 0x84]
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
mov byte [esp + 0x800], 1
call fcn.00415880
cmp dword [esp + 0x820], edi
jb 0x4115bc
mov eax, dword [esp + 0x80c]
push eax
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x83c], edi
mov dword [esp + 0x820], esi
mov dword [esp + 0x81c], ebx
mov byte [esp + 0x80c], 0
jb 0x4115eb
mov ecx, dword [esp + 0x828]
push ecx
call fcn.00420ede
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x7f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x7e0]
xor ecx, esp
call fcn.00441b4d
add esp, 0x7f0
ret
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
cmp dword [esp + 0x64], esi
jb 0x41163f
mov ecx, dword [esp + 0x50]
push ecx
call fcn.00420ede
add esp, 4
mov esi, 0xf
xor edi, edi
lea ecx, [esp + 0x84]
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], edi
mov byte [esp + 0x50], 0
mov byte [esp + 0x800], 1
call fcn.00415880
mov ebx, 0x10
cmp dword [esp + 0x820], ebx
jb 0x411685
mov edx, dword [esp + 0x80c]
push edx
call fcn.00420ede
add esp, 4
cmp dword [esp + 0x83c], ebx
mov dword [esp + 0x820], esi
mov dword [esp + 0x81c], edi
mov byte [esp + 0x80c], 0
jb 0x4116b4
mov eax, dword [esp + 0x828]
push eax
call fcn.00420ede
add esp, 4
mov eax, 8
jmp 0x4115f0
push 0x1ff
lea ecx, [esp + 0x1f9]
push 0
push ecx
mov byte [esp + 0x200], 0
call fcn.00445a00
imul ebx, ebx, 0x5c
mov esi, dword [esp + 0x28]
add esp, 0xc
lea edx, [ebx + esi + 1]
push edx
lea eax, [esp + 0x1f8]
push str.pak_data_read_file_fail_file__s
push eax
call fcn.004437c1
add esp, 0xc
lea ecx, [esp + 0x1f4]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call fcn.00420ede
add esp, 4
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
lea ecx, [esp + 0x4c]
call fcn.004014e0
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
lea ecx, [esp + 0x808]
call fcn.004014e0
lea ecx, [esp + 0x824]
call fcn.004014e0
mov eax, 5
jmp 0x4115f0
push 0x1ff
lea eax, [esp + 0x1f9]
push 0
push eax
mov byte [esp + 0x200], 0
call fcn.00445a00
mov eax, dword [esp + 0x78]
add esp, 0xc
cmp dword [esp + 0x80], esi
jae 0x411798
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1f8]
push str.file_write_fail__file__s
push ecx
call fcn.004437c1
add esp, 0xc
lea edx, [esp + 0x1f4]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x1c]
push eax
call fcn.00420ede
add esp, 4
lea ecx, [esp + 0x68]
call fcn.004014e0
lea ecx, [esp + 0x13c]
mov byte [esp + 0x800], 4
call fcn.00415880
lea ecx, [esp + 0x4c]
call fcn.004014e0
lea ecx, [esp + 0x84]
mov byte [esp + 0x800], 1
call fcn.00415880
lea ecx, [esp + 0x808]
call fcn.004014e0
lea ecx, [esp + 0x824]
call fcn.004014e0
mov eax, 7
jmp 0x4115f0