Function at 0x405a30
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x265c
call fcn.005589e0
push ebx
push esi
push edi
lea eax, [ebp - 0x20]
mov ebx, edx
mov edi, ecx
mov dword [ebp - 0x14], ebx
xor esi, esi
mov dword [ebp - 0xc], edi
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x405a92
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
call fcn.0057cc10
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
movsd qword [ebp - 0x30], xmm0
call fcn.0057cc10
movsd xmm1, qword [ebp - 0x30]
divsd xmm1, xmm0
movsd qword [ebp - 0x30], xmm1
jmp 0x405ab9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x5cbc70]
mulsd xmm0, qword [0x5cbc08]
movsd qword [ebp - 0x30], xmm0
xor ecx, ecx
mov dword [ebp - 0x38], esi
push 0x38
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x88]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], esi
mov ecx, 0x8000
movq qword [ebp - 0x40], xmm0
push 0
push eax
mov dword [ebp - 0x34], ecx
movups xmmword [ebp - 0x50], xmm0
call fcn.0055a650
add esp, 0xc
lea eax, [ebp - 0x658]
push 0x5d0
push 0
push eax
call fcn.0055a650
add esp, 0xc
test edi, edi
je 0x405b60
mov ecx, edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405b10
sub ecx, edx
je 0x405b60
push ecx
lea edx, [ebp - 8]
mov ecx, edi
call fcn.00403670
add esp, 4
test eax, eax
jne 0x405b34
push str.get_oldPath_type_ERROR__n
jmp 0x405b40
mov esi, dword [ebp - 8]
test esi, esi
jne 0x405b65
push str.oldPath_not_exist_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0xc
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
mov esi, 1
mov edx, ebx
lea ecx, [ebp - 0x88]
call fcn.004172b0
test eax, eax
jne 0x405b9b
push str.open_diffFile_for_read_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 2
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
lea eax, [ebp - 0x88]
push 0
push eax
lea edx, [ebp - 0x2c8]
lea ecx, [ebp - 0x658]
call fcn.00412e40
add esp, 8
test eax, eax
je 0x4063c9
lea eax, [ebp - 0x88]
lea ebx, [ebp - 0x658]
mov dword [ebp - 0x9c], eax
cmp dword [ebx], 0
je 0x4063c9
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x405bf1
cmp esi, 2
je 0x405c00
push str.input_old_path_need_dir_ERROR__n
jmp 0x405b40
cmp esi, 1
je 0x405c00
push str.input_old_path_need_file_ERROR__n
jmp 0x405b40
test ecx, ecx
mov edx, str.old_file:__
mov eax, str.old__dir:__
cmove eax, edx
push eax
call fcn.00402c70
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
mov dword [ebp - 8], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test edi, edi
je 0x405cca
push 0x1000
lea eax, [ebp - 0x2658]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call ebx
test eax, eax
jg 0x405c72
call esi
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562809
mov ecx, edi
mov dword [eax], ebx
mov eax, 0x5c1f7c
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
jmp 0x405c7d
mov eax, 0x5c1f78
lea ecx, [ebp - 0x2658]
push ecx
push eax
call fcn.00402c70
lea ecx, [ebp - 0x658]
add esp, 8
cmp dword [ecx + 8], 0
mov dword [ebp - 8], ecx
je 0x405cca
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ca0
sub ecx, edx
je 0x405cb2
cmp byte [ecx + edi - 1], 0x5c
je 0x405cc1
push 0x5c
push 0x5c31a4
call fcn.00402c70
add esp, 8
lea eax, [ebp - 0x658]
mov dword [ebp - 8], eax
push str.__ndiffFile:__
call fcn.00402c70
add esp, 4
lea eax, [ebp - 0x2658]
push 0x1000
push eax
push 0xffffffffffffffff
push dword [ebp - 0x14]
push 0
push 0xfde9
call ebx
mov edi, eax
test edi, edi
jg 0x405d0f
call esi
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562809
mov dword [eax], ebx
test edi, edi
lea eax, [ebp - 0x2658]
mov esi, 0x5c1f7c
mov ecx, 0x5c1f78
cmovle eax, dword [ebp - 0x14]
push eax
mov eax, esi
cmovg eax, ecx
push eax
call fcn.00402c70
mov ebx, dword [ebp - 8]
mov ecx, str.__nout_file:__
mov eax, str.__nout__dir:__
cmp dword [ebx + 4], 0
cmove eax, ecx
push eax
call fcn.00402c70
add esp, 0xc
lea eax, [ebp - 0x2658]
push 0x1000
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jg 0x405d91
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562809
mov dword [eax], ebx
mov ebx, dword [ebp - 8]
test edi, edi
lea eax, [ebp - 0x2658]
cmovle eax, dword [ebp + 8]
push eax
mov eax, 0x5c1f78
cmovg esi, eax
push esi
call fcn.00402c70
add esp, 8
cmp dword [ebx + 4], 0
je 0x405de1
mov esi, dword [ebp + 8]
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405dc0
sub ecx, edx
je 0x405dd2
cmp byte [ecx + esi - 1], 0x5c
je 0x405de1
push 0x5c
push 0x5c31a4
call fcn.00402c70
add esp, 8
push 0x5c1fb8
call fcn.00402c70
lea eax, [ebx + 0x10]
add esp, 4
mov esi, eax
mov dword [ebp - 0x14], eax
xor eax, eax
lea edi, [ebp - 0x770]
cmp dword [ebx + 0xc], eax
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x760]
setne al
xorps xmm0, xmm0
add edx, eax
mov dword [ebp - 0x760], edx
movups xmmword [ebp - 0x50], xmm0
movq qword [ebp - 0x40], xmm0
jne 0x4063a0
lea ecx, [ebp - 0x75c]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405e34
sub ecx, esi
je 0x405e54
push edx
lea eax, [ebp - 0x75c]
push eax
push str.hpatchz_run_with_decompress_plugin:___s___need_decompress__d__n
call fcn.00402c70
add esp, 0xc
push dword [ebp + 8]
xor eax, eax
lea edx, [ebp - 0x50]
cmp dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x658]
push dword [ebp - 0xc]
cmove edx, eax
call fcn.00414230
add esp, 8
test eax, eax
jne 0x405e9c
push str.load_dir_data_in_diffFile_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6d
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
mov edi, dword [ebp + 0x1c]
lea ecx, [ebp - 0x658]
push ecx
push edi
mov eax, dword [edi + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x405ed8
push str.dir_patch_begin_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x72
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
mov esi, dword [ebp + 0x18]
mov eax, dword [esi + 0x10]
add eax, dword [esi + 0xc]
add eax, dword [esi + 8]
add eax, dword [esi + 4]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x405f28
lea edi, [ebx + 0x28c]
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405f00
sub ecx, edx
jne 0x406030
xorps xmm0, xmm0
movups xmmword [esi], xmm0
push str.__NOTE:_no_checksum_saved_in_diffFile_can_not_do_checksum_n
mov dword [esi + 0x10], ecx
call fcn.00402c70
add esp, 4
mov edi, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x2b4]
add eax, dword [ebp - 0x2b0]
push 0
push eax
push 0
push dword [ebp - 0x2c0]
push str.DirPatch_new_path_count:__I64u__fileCount:_I64u__n
call fcn.00402c70
add esp, 0x14
push dword [ebp - 0x29c]
push dword [ebp - 0x2a0]
push 0
push dword [ebp - 0x2b0]
push str.____copy_from_old_count:__I64u__dataSize:__I64u__n
call fcn.00402c70
add esp, 0x14
push 0
push dword [ebp - 0x2b8]
push str._____ref_old_file_count:__I64u_n
call fcn.00402c70
add esp, 0xc
push 0
push dword [ebp - 0x2b4]
push str._____ref_new_file_count:__I64u_n
call fcn.00402c70
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov esi, dword [edx]
mov ecx, esi
mov edx, dword [edx + 4]
mov eax, edx
add ecx, dword [ebp - 0x2a0]
adc eax, dword [ebp - 0x29c]
push eax
push ecx
push edx
push esi
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
push dword [ebx + 0x1c]
push dword [ebx + 0x18]
push str.oldRefSize__:__I64u_ndiffDataSize:__I64u_nnewRefSize__:__I64u__all_newSize:__I64u__n
call fcn.00402c70
xor eax, eax
add esp, 0x24
cmp dword [ebx + 0x128], eax
je 0x405fe5
mov eax, dword [ebx + 0x160]
lea ecx, [eax + 0x8000]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0xc]
push ecx
push dword [ebx + 0x1c]
mov ecx, dword [ebp + 0xc]
push dword [ebx + 0x18]
push eax
call fcn.00404f90
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x24], esi
test esi, esi
jne 0x40618d
push str.alloc_cache_memory_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 8
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
mov dword [esi], 0
call dword [0x5ea790]
mov ecx, eax
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406060
test dl, dl
je 0x40605c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406060
add eax, 2
add ecx, 2
test dl, dl
jne 0x406040
xor eax, eax
jmp 0x406065
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406071
mov dword [esi], 0x5ea790
jmp 0x4060ef
call dword [0x5ea7d0]
mov ecx, eax
mov eax, edi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4060a0
test dl, dl
je 0x40609c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4060a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x406080
xor eax, eax
jmp 0x4060a5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4060b1
mov dword [esi], 0x5ea7d0
jmp 0x4060ef
call dword [0x5ea7ec]
mov ecx, eax
mov eax, edi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4060e0
test dl, dl
je 0x4060dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4060e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4060c0
xor eax, eax
jmp 0x4060e5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406167
mov dword [esi], 0x5ea7ec
push dword [ebp - 0xc]
push edi
push str.hpatchz_run_with_checksum_plugin:___s___need_checksum__d__n
call fcn.00402c70
add esp, 0xc
lea ecx, [ebp - 0x658]
mov edx, esi
call fcn.00414080
test eax, eax
jne 0x405f25
cmp dword [ebp - 0x248], eax
je 0x406142
push str.diffFile_checksum_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x68
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.diffFile_set_checksum_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x67
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push 2
call fcn.00562462
add esp, 4
push edi
push str.not_found_checksumType___s__ERROR__n
push eax
call fcn.00402c50
mov ebx, 0x66
add esp, 0xc
mov dword [ebp - 4], ebx
jmp 0x406415
mov ecx, dword [ebp - 0x34]
xor eax, eax
add ecx, dword [ebx + 0x18]
mov esi, dword [ebp - 0xc]
adc eax, dword [ebx + 0x1c]
xor edx, edx
cmp edx, eax
jb 0x4061ae
ja 0x4061a7
cmp esi, ecx
jb 0x4061ae
mov edx, 4
jmp 0x4061b1
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x658]
call fcn.00414830
add esp, 4
test eax, eax
jne 0x4061ec
push str.open_oldFile_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6e
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
lea eax, [ebp - 0x1c]
mov edx, edi
push eax
lea ecx, [ebp - 0x658]
call fcn.00414c00
add esp, 4
test eax, eax
jne 0x406229
push str.open_newFile_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6f
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
lea eax, [esi + ecx]
push eax
push ecx
push dword [ebp - 0x38]
lea ecx, [ebp - 0x658]
call fcn.00414cc0
add esp, 0xc
test eax, eax
jne 0x406413
mov eax, dword [ebp - 0x3c]
cmp eax, 4
ja case.0x406259.3
jmp dword [eax*4 + 0x40665c]
push str.decompressPlugin_alloc_memory_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x16
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.decompressPlugin_open_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x14
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.decompressPlugin_close_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x15
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
cmp dword [ebp - 0x244], 0
je 0x4062fd
push str.oldFile_checksum_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x69
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
cmp dword [ebp - 0x14c], 0
je 0x40632b
push str.copyOldFile_checksum_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6b
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
cmp dword [ebp - 0x150], 0
je 0x406359
push str.newFile_checksum_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6a
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.dir_patch_run_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x6c
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.decompressPlugin_decompress_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x17
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
lea eax, [ebp - 0x75c]
push eax
push str.can_not_decompress___s__data_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0xa
add esp, 0xc
mov dword [ebp - 4], ebx
jmp 0x406415
cmp dword [ebp - 0x58], 0
je 0x4063f1
push str.read_diffFile_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 4
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
push str.is_hdiff_file__get_dir_diff_info_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov ebx, 0x65
add esp, 8
mov dword [ebp - 4], ebx
jmp 0x406415
xor ebx, ebx
mov edi, dword [ebp + 0x1c]
xor eax, eax
test ebx, ebx
sete al
mov ecx, dword [edi + 0x1c]
push eax
push edi
call ecx
add esp, 8
test eax, eax
jne 0x406452
push str.dir_patch_finish_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov eax, 0x73
test ebx, ebx
cmove ebx, eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x240]
call fcn.00415e70
test eax, eax
jne 0x406486
push str.newPath_close_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov eax, 0x71
test ebx, ebx
cmove ebx, eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x658]
call fcn.00414ab0
test eax, eax
jne 0x4064ba
push str.oldPath_close_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov eax, 0x70
test ebx, ebx
cmove ebx, eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x658]
call fcn.00414fb0
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x40650b
push str.dir_patch_file_ERROR__n
push 2
cmp eax, 0x1c
jne 0x4064f3
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov esi, 0x18
jmp 0x40650e
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov esi, 0x74
jmp 0x40650e
mov esi, dword [ebp - 4]
mov eax, dword [edi + 0x20]
test eax, eax
je 0x40654c
push str.dir_patch_file_ERROR__n
push 2
cmp eax, 0x1c
jne 0x406536
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov esi, 0x18
jmp 0x406549
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
mov esi, 0x74
add esp, 8
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x4065c6
push eax
mov dword [ebp - 0x70], 0
call fcn.0056428d
add esp, 4
test eax, eax
je 0x4065c6
call fcn.00562809
mov edi, dword [eax]
mov eax, dword [ebp - 0x58]
cmp eax, edi
je 0x4065a4
test edi, edi
je 0x4065a4
test eax, eax
push edi
cmove eax, edi
mov dword [ebp - 0x58], eax
call fcn.00562b53
add esp, 4
push eax
push edi
push str.call_import_system_api_error__errno:__d__errmsg:__s._n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 0x10
push str.diffFile_close_ERROR__n
push 2
call fcn.00562462
add esp, 4
push eax
call fcn.00402c50
add esp, 8
mov eax, 7
test esi, esi
cmove esi, eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4065d6
push eax
call fcn.0055d993
add esp, 4
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x406614
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.0057cc10
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
movsd qword [ebp - 0x10], xmm0
call fcn.0057cc10
movsd xmm1, qword [ebp - 0x10]
divsd xmm1, xmm0
jmp 0x406636
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x5cbc70]
mulsd xmm1, qword [0x5cbc08]
subsd xmm1, qword [ebp - 0x30]
sub esp, 8
movsd qword [esp], xmm1
push str._nhpatchz_dir_patch_time:__.3f_s_n
call fcn.00402c70
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret