Function at 0x40a71e
Capabilities:
Read file on windows

Disassembly:
push 0x60
mov eax, 0x41f599
call fcn.0040e3fe
mov eax, dword [ebp + 8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov edi, ecx
mov dword [ebp - 0x68], edi
cmp eax, ebx
je 0x40a98d
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x5c], esi
lea eax, [ebp - 0x5c]
mov dword [ebp - 4], ebx
call fcn.00403334
test al, al
je 0x40a7b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40a781
and eax, 0xffff
or eax, 0x80070000
push eax
push 0x424390
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2b0
push ebx
mov ecx, str.webhttpdownload.cpp
call fcn.00402697
add esp, 0x14
cmp esi, ebx
je 0x40a98d
cmp esi, 0xffffffff
je 0x40a98d
push esi
jmp 0x40a987
push ebx
lea eax, [ebp - 0x6c]
push eax
push 0x2d
push edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x6c], ebx
call esi
test eax, eax
je 0x40a947
push ebx
lea eax, [ebp - 0x6c]
push eax
push 4
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x5c]
call esi
test eax, eax
je 0x40a947
push 0x2d
push edi
push ebx
call fcn.00401698
add esp, 0xc
cmp dword [ebp - 0x64], eax
je 0x40a820
push str.CfgFile_crc_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2c2
push ebx
mov ecx, str.webhttpdownload.cpp
call fcn.00402697
add esp, 0x10
jmp 0x40a979
xor eax, eax
mov byte [ebp - 0x20], bl
lea edi, [ebp - 0x1f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x60]
add eax, 0x62c
push eax
call fcn.004097ea
mov esi, dword [ebp - 0x68]
pop ecx
pop ecx
push 4
add esi, 0x10
pop ecx
lea edi, [ebp - 0x20]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40a865
push str.file_md5_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2cb
jmp 0x40a80d
mov eax, dword [ebp - 0x60]
add eax, 0x21c
push eax
lea esi, [ebp - 0x3c]
call fcn.00401183
push str..dt_
mov eax, esi
push eax
mov byte [ebp - 4], 1
call fcn.004026b1
mov ecx, dword [ebp - 0x3c]
xor eax, eax
cmp dword [ebp - 0x28], 8
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
jae 0x40a89b
mov ecx, esi
lea eax, [ebp - 0x58]
push eax
call fcn.0040209e
cmp dword [eax + 0x14], 8
pop ecx
jb 0x40a8ad
mov eax, dword [eax]
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.004097ea
pop ecx
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x58]
call fcn.004013ee
mov eax, dword [ebp - 0x68]
push 4
pop ecx
lea edi, [ebp - 0x20]
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x40a901
push str.dtfile_md5_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2d5
push ebx
mov ecx, str.webhttpdownload.cpp
call fcn.00402697
add esp, 0x10
push 1
xor edi, edi
lea esi, [ebp - 0x3c]
call fcn.004013ee
jmp 0x40a979
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0x60]
cmp eax, dword [ecx + 0x690]
jl 0x40a922
push str.Exceed_max_resume_times.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2dc
push 5
jmp 0x40a8e6
push 1
xor edi, edi
lea esi, [ebp - 0x3c]
call fcn.004013ee
cmp dword [ebp - 0x5c], ebx
je 0x40a942
cmp dword [ebp - 0x5c], 0xffffffff
je 0x40a942
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x40a98f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40a95b
and eax, 0xffff
or eax, 0x80070000
push eax
push str.Failed_ReadFile:_0x_08x.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push 0x2bb
push ebx
mov ecx, str.webhttpdownload.cpp
call fcn.00402697
add esp, 0x14
cmp dword [ebp - 0x5c], ebx
je 0x40a98d
cmp dword [ebp - 0x5c], 0xffffffff
je 0x40a98d
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
call fcn.0040e481
ret 8