Function at 0x41c88d
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xc4
mov byte [ebp - 0xf], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 0xd], 0
mov byte [ebp - 0xe], 0
movzx eax, byte [ebp - 0xf]
xor eax, 1
test al, al
jne 0x41c8d3
mov dword [esp + 8], 0x3ba
mov dword [esp + 4], str.src_patcher_patcher.c
mov dword [esp], str._handleOpened
mov eax, dword [0x41f504]
call eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x41c8f8
mov dword [esp + 8], 0x3bb
mov dword [esp + 4], str.src_patcher_patcher.c
mov dword [esp], str._data
mov eax, dword [0x41f504]
call eax
movzx eax, byte [ebp - 0xd]
xor eax, 1
test al, al
jne 0x41c921
mov dword [esp + 8], 0x3bc
mov dword [esp + 4], str.src_patcher_patcher.c
mov dword [esp], str._writingBackup
mov eax, dword [0x41f504]
call eax
movzx eax, byte [ebp - 0xe]
xor eax, 1
test al, al
jne 0x41c94a
mov dword [esp + 8], 0x3bd
mov dword [esp + 4], str.src_patcher_patcher.c
mov dword [esp], str._readingBackup
mov eax, dword [0x41f504]
call eax
mov eax, dword [str.patch_backup.zip]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0x14], eax
mov eax, dword [0x42702c]
mov dword [ebp - 0x9c], eax
mov eax, dword [0x427024]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], 1
mov dword [ebp - 0x8c], 0
lea eax, [ebp - 0x9c]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.0041b405
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x41c9ce
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._An_unrealistic_amount_of_memory_is_required_to_extract_the_absolute_path_to_the_backup_file__s._This_is_likely_due_to_a_bug_in_the_patcher._Please_report_it.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce9d
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.0041b511
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x41ce99
mov eax, dword [0x427028]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov eax, dword [0x427020]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_wcscat
mov eax, dword [str.patch_backup.zip]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_wcscat
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
sub esp, 0x1c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
cmp dword [ebp - 0x20], 0xffffffff
jne 0x41caa2
mov edx, dword [0x427028]
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._Couldnt_open_or_create_the_backup_file__s_in_directory__s._If_it_exists__make_sure_its_not_being_used_by_another_application_before_running_the_patcher_again.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce9d
mov byte [ebp - 0xf], 1
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0xb7
jne 0x41cc51
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x41cafa
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._The_backup_file__s_already_exists_but_couldnt_determine_its_size._Try_running_the_patcher_again.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce81
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x41cb1e
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._The_backup_file__s_already_exists_but_its_too_large_so_its_contents_cannot_be_verified._Its_unlikely_that_this_file_was_created_by_the_patcher._In_order_to_run_the_patcher_successfully_you_must_restore_the_original_game_files_and_delete_the_backup_file._A_new_backup_file_will_be_created_by_the_patcher_before_it_modifies_any_files.
mov dword [esp], 0x10
call fcn.0041b298
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.0041b511
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x41ce7d
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x10], 0
lea ecx, [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x41cb90
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._The_backup_file__s_already_exists_but_couldnt_read_its_contents._Close_some_programs_and_try_running_the_patcher_again.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce69
mov dword [esp + 8], 0x50
mov dword [esp + 4], 0
lea eax, [ebp - 0x88]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0040c970
test eax, eax
jne 0x41cbf8
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._The_backup_file__s_already_exists_but_couldnt_read_its_contents._Close_some_programs_and_try_running_the_patcher_again.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce69
mov byte [ebp - 0xe], 1
mov dword [ebp - 0xc], 0x41f380
jmp 0x41cc29
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0041c380
xor eax, 1
test al, al
jne 0x41ce4e
add dword [ebp - 0xc], 0x70
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x41cc05
mov byte [ebp - 0xe], 0
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0040c80e
test eax, eax
jne 0x41ce28
jmp 0x41ce52
mov dword [ebp - 0xc], str.system.dll
jmp 0x41ccaa
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 0x68]
test al, al
je 0x41cca6
mov ebx, dword [str.PATCH_BACKUP.ZIP]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
mov edx, dword [str.PATCH_BACKUP.ZIP]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._Couldnt_write_the_file__s_to_the_newly_created_backup_file__s_because_its_already_patched._The_backup_file_will_be_left_empty._In_order_to_run_the_patcher_successfully_you_need_to_restore_the_original_file__s_and_delete_the_empty_backup_file__s.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce52
add dword [ebp - 0xc], 0x70
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x41cc5a
mov dword [esp + 8], 0x50
mov dword [esp + 4], 0
lea eax, [ebp - 0x88]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00411fe7
test eax, eax
jne 0x41cd14
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._An_error_occured_while_writing_the_backup_file__s._This_file_now_has_an_inconsistent_state_and_you_need_to_delete_it_before_rerunning_the_patcher.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce52
mov byte [ebp - 0xd], 1
mov dword [ebp - 0xc], 0x41f380
jmp 0x41cd45
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0041c6c1
xor eax, 1
test al, al
jne 0x41ce37
add dword [ebp - 0xc], 0x70
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x41cd21
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0041ac64
test eax, eax
jne 0x41cd90
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._An_error_occured_while_writing_the_backup_file__s._This_file_now_has_an_inconsistent_state_and_you_need_to_delete_it_before_rerunning_the_patcher.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce38
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0041ad73
test eax, eax
jne 0x41cdc1
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._An_error_occured_while_writing_the_backup_file__s._This_file_now_has_an_inconsistent_state_and_you_need_to_delete_it_before_rerunning_the_patcher.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce38
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x41ce16
mov eax, dword [str.PATCH_BACKUP.ZIP]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Patching_failed._An_error_occured_while_writing_the_backup_file__s._This_file_now_has_an_inconsistent_state_and_you_need_to_delete_it_before_rerunning_the_patcher.
mov dword [esp], 0x10
call fcn.0041b298
jmp 0x41ce38
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
mov dword [0x427030], eax
mov eax, 1
jmp 0x41cea2
nop
cmp byte [ebp - 0xd], 0
je 0x41ce51
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0041ad73
jmp 0x41ce52
nop
jmp 0x41ce52
nop
cmp byte [ebp - 0xe], 0
je 0x41ce68
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.0040c80e
jmp 0x41ce69
nop
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x41ce80
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x41ce81
nop
jmp 0x41ce81
nop
cmp byte [ebp - 0xf], 0
je 0x41ce9c
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
jmp 0x41ce9d
nop
jmp 0x41ce9d
nop
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret