Function at 0x404ff0
Capabilities:
Check for time delay via gettickcount
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2288
call fcn.00559000
push ebx
push esi
push edi
lea eax, [ebp - 0x14]
mov dword [ebp - 8], edx
push eax
mov edi, ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40504a
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
call fcn.0057d0f0
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
movsd qword [ebp - 0x24], xmm0
call fcn.0057d0f0
movsd xmm1, qword [ebp - 0x24]
divsd xmm1, xmm0
movsd qword [ebp - 0x24], xmm1
jmp 0x405071
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x5cb850]
mulsd xmm0, qword [0x5cb7f0]
movsd qword [ebp - 0x24], xmm0
push 0x38
xorps xmm0, xmm0
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x6c]
movq qword [ebp - 0xac], xmm0
push 0
push eax
movups xmmword [ebp - 0xbc], xmm0
mov dword [ebp - 0x1c], esi
call fcn.0055ab60
add esp, 0xc
lea eax, [ebp - 0xa4]
push 0x38
push 0
push eax
call fcn.0055ab60
add esp, 0xc
lea eax, [ebp - 0x104]
push 0x48
push 0
push eax
call fcn.0055ab60
add esp, 0xc
push str.old_:__
call fcn.00402c40
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
test edi, edi
je 0x405135
push 0x1000
lea eax, [ebp - 0x2284]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jg 0x405121
call ebx
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562ce9
push edi
push 0x5c34bc
mov dword [eax], ebx
call fcn.00402c40
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405132
lea eax, [ebp - 0x2284]
push eax
push 0x5c34b8
call fcn.00402c40
add esp, 8
push str.__ndiff:__
call fcn.00402c40
add esp, 4
lea eax, [ebp - 0x2284]
push 0x1000
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
jg 0x405184
call ebx
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562ce9
mov ecx, dword [ebp - 0x10]
mov dword [eax], ebx
test ecx, ecx
lea eax, [ebp - 0x2284]
mov ebx, 0x5c34bc
mov edx, 0x5c34b8
cmovle eax, dword [ebp - 8]
push eax
mov eax, ebx
cmovg eax, edx
push eax
call fcn.00402c40
push str.__nout_:__
call fcn.00402c40
add esp, 0xc
lea eax, [ebp - 0x2284]
push 0x1000
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
jg 0x4051fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x7a
setne bl
lea ebx, [ebx*4 + 0x26]
call fcn.00562ce9
mov ecx, dword [ebp - 0x10]
mov dword [eax], ebx
mov ebx, 0x5c34bc
test ecx, ecx
lea eax, [ebp - 0x2284]
cmovle eax, dword [ebp + 8]
push eax
mov eax, 0x5c34b8
cmovg ebx, eax
push ebx
call fcn.00402c40
push 0x5c34f8
call fcn.00402c40
add esp, 0xc
test edi, edi
je 0x40526b
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405230
sub ecx, edx
je 0x40526b
mov edx, edi
lea ecx, [ebp - 0x6c]
call fcn.00417650
test eax, eax
jne 0x405272
push str.open_oldFile_for_read_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 2
jmp 0x4057e0
mov dword [ebp - 0x5c], 0x418710
mov edx, dword [ebp - 8]
lea ecx, [ebp - 0xa4]
call fcn.00417650
test eax, eax
jne 0x40528b
push str.open_diffFile_for_read_ERROR__n
jmp 0x40524e
lea eax, [ebp - 0xa4]
push eax
lea edx, [ebp - 0x284]
lea ecx, [ebp - 0x21c]
call fcn.004199d0
add esp, 4
test eax, eax
jne 0x4053d7
cmp dword [ebp - 0x74], esi
je 0x4052d5
push str.read_diffFile_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 4
jmp 0x4057e0
sub esp, 8
lea edx, [ebp - 0xa4]
lea ecx, [ebp - 0x3c4]
call fcn.0041aec0
add esp, 8
test eax, eax
je 0x4053b5
lea ecx, [ebp - 0x38c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405300
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x38c]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.0055acc0
mov ecx, dword [ebp - 0x3c0]
xor eax, eax
mov edi, dword [ebp - 0x390]
add esp, 0xc
cmp byte [ebp - 0x38c], al
mov dword [ebp - 0x218], ecx
mov ecx, dword [ebp - 0x3b8]
setne al
mov dword [ebp - 0x20c], eax
mov eax, dword [ebp - 0x3c4]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x3bc]
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], ecx
test edi, edi
jne 0x405393
push str.patch_single_compressed_diffData__n
mov dword [ebp - 0x18], 1
call fcn.00402c40
mov eax, 0x3000
add esp, 4
cmp dword [ebp + 0x10], eax
cmovae eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
jmp 0x4053dd
push str.stepMemSize_too_large_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 8
jmp 0x4057e0
push str.is_hdiff_file__get_diffInfo_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 9
jmp 0x4057e0
mov edi, dword [ebp - 0x390]
mov eax, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x60]
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x214]
jne 0x4057b0
cmp ebx, dword [ebp - 0x210]
jne 0x4057b0
mov edx, dword [ebp - 0xb8]
test edx, edx
jne 0x405449
mov ebx, dword [ebp - 0x20c]
test ebx, ebx
jne 0x405499
lea ecx, [ebp - 0x208]
lea eax, [ecx + 1]
mov dword [ebp - 0x10], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405422
sub ecx, dword [ebp - 0x10]
je 0x405449
push ebx
lea eax, [ebp - 0x208]
push eax
push str.hpatchz_run_with_decompress_plugin:___s___need_decompress__d__n
call fcn.00402c40
mov edx, dword [ebp - 0xb8]
add esp, 0xc
push dword [ebp - 0x218]
xor eax, eax
lea ebx, [ebp - 0xbc]
push dword [ebp - 0x21c]
test edx, edx
lea ecx, [ebp - 0x104]
mov edx, dword [ebp + 8]
cmove ebx, eax
call fcn.00417b20
add esp, 8
test eax, eax
jne 0x4054c2
push str.open_out_newFile_for_write_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 3
jmp 0x4057e0
lea eax, [ebp - 0x208]
push eax
push str.can_not_decompress___s__data_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 0xc
mov esi, 0xa
jmp 0x4057e0
push dword [ebp - 0xf8]
push dword [ebp - 0xfc]
push dword [ebp - 0x98]
push dword [ebp - 0x9c]
push dword [ebp - 0x60]
push dword [ebp - 0x64]
push str.oldDataSize_:__I64u_ndiffDataSize:__I64u_nnewDataSize_:__I64u_n
call fcn.00402c40
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 8]
add esp, 0x1c
xor eax, eax
cmp dword [ebp - 0x18], eax
cmovne eax, dword [ebp - 0x394]
push ecx
push dword [ebp - 0x60]
mov ecx, dword [ebp + 0xc]
push dword [ebp - 0x64]
push eax
call fcn.00404f60
mov ecx, eax
add esp, 0x10
mov dword [ebp - 0x1c], ecx
test ecx, ecx
jne 0x405525
push str.alloc_cache_memory_ERROR__n
jmp 0x405398
cmp dword [ebp - 0x18], esi
je 0x4055be
mov edx, dword [ebp - 0x394]
mov eax, edx
mov ecx, dword [ebp - 8]
add eax, 0x3000
adc edi, esi
cmp esi, edi
ja 0x405554
jb 0x40554a
cmp ecx, eax
jae 0x405554
push str.alloc_cache_memory_ERROR__n
jmp 0x405398
mov edi, dword [ebp - 0x1c]
push ecx
lea eax, [ecx + edi]
push eax
push edi
push edx
push dword [ebp - 0x398]
lea eax, [ebp - 0xa4]
push dword [ebp - 0x39c]
lea edx, [ebp - 0x6c]
push ebx
push dword [ebp - 0x3a8]
lea ecx, [ebp - 0x104]
push dword [ebp - 0x3ac]
push dword [ebp - 0x3b0]
push dword [ebp - 0x3b4]
push dword [ebp - 0x3a0]
push dword [ebp - 0x3a4]
push eax
call fcn.0041add0
xor ecx, ecx
add esp, 0x38
test eax, eax
mov edi, 0x10
cmovne edi, ecx
jne 0x405643
jmp 0x405692
add dword [ebp - 8], ecx
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x10]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x30], ecx
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x28], esi
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x18], esi
push eax
push ecx
push ebx
push ecx
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0xf8]
lea ecx, [ebp - 0x28]
push dword [ebp - 0xfc]
call fcn.0041aa20
add esp, 0x24
cmp dword [ebp - 0x18], esi
jne 0x40568d
push dword [ebp - 8]
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0xa4]
push dword [ebp - 0x30]
lea ecx, [ebp - 0x104]
push edi
push ebx
push eax
push dword [ebp - 0x10]
call fcn.00419c60
add esp, 0x18
mov ebx, eax
test edi, edi
je 0x40563f
mov eax, dword [edi + 0xc]
push edi
call eax
add esp, 4
test eax, eax
je 0x40568d
test ebx, ebx
je 0x40568d
mov edx, dword [ebp - 0xc4]
mov edi, dword [ebp - 0xfc]
mov eax, dword [ebp - 0xc0]
mov ecx, dword [ebp - 0xf8]
cmp edx, edi
jne 0x405675
cmp eax, ecx
jne 0x405675
push str.__patch_ok__n
call fcn.00402c40
add esp, 4
jmp 0x4057e0
push ecx
push edi
push eax
push edx
push str.out_newFile_dataSize__I64u___diffFile_saved_newDataSize__I64u_ERROR__n
push 2
call fcn.00562942
add esp, 4
jmp 0x4057cf
mov edi, 0xb
cmp dword [ebp - 0x3c], esi
je 0x4056a1
push str.oldFile_read_ERROR__n
jmp 0x4052b8
cmp dword [ebp - 0x74], esi
je 0x4056b0
push str.diffFile_read_ERROR__n
jmp 0x4052b8
mov eax, dword [ebp - 0xd4]
test eax, eax
je 0x4056fc
push str.out_newFile_write_ERROR__n
push 2
cmp eax, 0x1c
jne 0x4056e1
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 0x18
jmp 0x4057e0
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 5
jmp 0x4057e0
mov eax, dword [ebp - 0xa8]
cmp eax, 4
ja case.0x40570b.3
jmp dword [eax*4 + 0x4059ec]
push str.decompressPlugin_alloc_memory_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 0x16
jmp 0x4057e0
push str.decompressPlugin_open_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 0x14
jmp 0x4057e0
push str.decompressPlugin_close_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 0x15
jmp 0x4057e0
push str.patch_run_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, edi
jmp 0x4057e0
push str.decompressPlugin_decompress_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
mov esi, 0x17
jmp 0x4057e0
push 2
call fcn.00562942
add esp, 4
push dword [ebp - 0x210]
push dword [ebp - 0x214]
push ebx
push dword [ebp - 0x10]
push str.oldFile_dataSize__I64u___diffFile_saved_oldDataSize__I64u_ERROR__n
push eax
call fcn.00402c20
mov esi, 6
add esp, 0x18
nop dword [eax]
mov eax, dword [ebp - 0xec]
mov ebx, 7
test eax, eax
je 0x405866
push eax
mov dword [ebp - 0xec], 0
call fcn.0056464d
add esp, 4
test eax, eax
je 0x405866
call fcn.00562ce9
mov edi, dword [eax]
mov eax, dword [ebp - 0xd4]
cmp eax, edi
je 0x405849
test edi, edi
je 0x405849
test eax, eax
push edi
cmove eax, edi
mov dword [ebp - 0xd4], eax
call fcn.00563033
add esp, 4
push eax
push edi
push str.call_import_system_api_error__errno:__d__errmsg:__s._n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 0x10
push str.out_newFile_close_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
test esi, esi
cmove esi, ebx
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x4058e1
push eax
mov dword [ebp - 0x8c], 0
call fcn.0056464d
add esp, 4
test eax, eax
je 0x4058e1
call fcn.00562ce9
mov edi, dword [eax]
mov eax, dword [ebp - 0x74]
cmp eax, edi
je 0x4058c4
test edi, edi
je 0x4058c4
test eax, eax
push edi
cmove eax, edi
mov dword [ebp - 0x74], eax
call fcn.00563033
add esp, 4
push eax
push edi
push str.call_import_system_api_error__errno:__d__errmsg:__s._n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 0x10
push str.diffFile_close_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
test esi, esi
cmove esi, ebx
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x405956
push eax
mov dword [ebp - 0x54], 0
call fcn.0056464d
add esp, 4
test eax, eax
je 0x405956
call fcn.00562ce9
mov edi, dword [eax]
mov eax, dword [ebp - 0x3c]
cmp eax, edi
je 0x405939
test edi, edi
je 0x405939
test eax, eax
push edi
cmove eax, edi
mov dword [ebp - 0x3c], eax
call fcn.00563033
add esp, 4
push eax
push edi
push str.call_import_system_api_error__errno:__d__errmsg:__s._n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 0x10
push str.oldFile_close_ERROR__n
push 2
call fcn.00562942
add esp, 4
push eax
call fcn.00402c20
add esp, 8
test esi, esi
cmove esi, ebx
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405966
push eax
call fcn.0055de73
add esp, 4
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x4059a4
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.0057d0f0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
movsd qword [ebp - 0x34], xmm0
call fcn.0057d0f0
movsd xmm1, qword [ebp - 0x34]
divsd xmm1, xmm0
jmp 0x4059c6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x5cb850]
mulsd xmm1, qword [0x5cb7f0]
subsd xmm1, qword [ebp - 0x24]
sub esp, 8
movsd qword [esp], xmm1
push str._nhpatchz_time:__.3f_s_n
call fcn.00402c40
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret