Function at 0x40e400
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ffa0
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x42807c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x60], esi
cmp eax, ebx
je 0x40e766
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x6c], edi
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x40e46b
cmp edi, 0xffffffff
jne 0x40e4b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40e47f
and eax, 0xffff
or eax, 0x80070000
push eax
push 0x425dd0
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push ebx
mov edx, 0x2bf
call fcn.00402b80
add esp, 0x14
cmp edi, ebx
je 0x40e766
cmp edi, 0xffffffff
je 0x40e766
jmp 0x40e75f
push ebx
lea ecx, [ebp - 0x64]
push ecx
push 0x2d
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
call esi
test eax, eax
je 0x40e72d
push ebx
lea edx, [ebp - 0x64]
push edx
push 4
lea eax, [ebp - 0x68]
push eax
push edi
call esi
test eax, eax
je 0x40e72d
mov esi, dword [ebp - 0x60]
push 0x2d
push esi
push ebx
call fcn.00401880
add esp, 0xc
cmp dword [ebp - 0x68], eax
je 0x40e51e
push str.CfgFile_crc_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push ebx
mov edx, 0x2d1
call fcn.00402b80
add esp, 0x10
jmp 0x40e75f
mov edx, dword [ebp - 0x5c]
xor eax, eax
lea ecx, [ebp - 0x20]
push ecx
add edx, 0x62c
push edx
mov byte [ebp - 0x20], bl
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
call fcn.0040cd70
lea eax, [ebp - 0x20]
lea edx, [esi + 0x10]
mov esi, eax
add esp, 8
mov ecx, 0x10
sub edx, esi
jmp 0x40e560
mov esi, dword [edx + eax]
cmp esi, dword [eax]
jne 0x40e691
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x40e560
mov eax, dword [ebp - 0x5c]
add eax, 0x21c
xor ecx, ecx
mov word [ebp - 0x3c], cx
mov ecx, eax
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40e593
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00401540
push 4
mov eax, str..dt_
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.00402bd0
mov ecx, dword [ebp - 0x3c]
xor eax, eax
mov esi, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x28], esi
jae 0x40e5dc
lea ecx, [ebp - 0x3c]
lea ebx, [ebp - 0x58]
call fcn.00402350
cmp dword [eax + 0x14], esi
jb 0x40e5eb
mov eax, dword [eax]
lea edx, [ebp - 0x20]
push edx
push eax
call fcn.0040cd70
add esp, 8
cmp dword [ebp - 0x44], esi
jb 0x40e609
mov eax, dword [ebp - 0x58]
push eax
call fcn.0040ed52
add esp, 4
mov ebx, dword [ebp - 0x60]
lea eax, [ebp - 0x20]
mov edx, ebx
mov esi, eax
mov ecx, 0x10
sub edx, esi
lea ebx, [ebx]
mov esi, dword [edx + eax]
cmp esi, dword [eax]
jne 0x40e6b3
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x40e620
mov eax, dword [ebx + 0x28]
mov ecx, dword [ebp - 0x5c]
cmp eax, dword [ecx + 0x690]
jb 0x40e6f9
push str.Exceed_max_resume_times.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push 5
mov edx, 0x2eb
call fcn.00402b80
add esp, 0x10
cmp dword [ebp - 0x28], 8
jb 0x40e678
mov edx, dword [ebp - 0x3c]
push edx
call fcn.0040ed52
add esp, 4
xor eax, eax
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], ax
jmp 0x40e75f
push str.file_md5_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push ebx
mov edx, 0x2da
call fcn.00402b80
add esp, 0x10
jmp 0x40e75f
push str.dtfile_md5_not_match.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push 0
mov edx, 0x2e4
call fcn.00402b80
add esp, 0x10
cmp dword [ebp - 0x28], 8
jb 0x40e6e3
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.0040ed52
add esp, 4
xor edx, edx
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], dx
jmp 0x40e75f
cmp dword [ebp - 0x28], 8
jb 0x40e70b
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.0040ed52
add esp, 4
xor edx, edx
push edi
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], dx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x40e768
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40e741
and eax, 0xffff
or eax, 0x80070000
push eax
push str.Failed_ReadFile:_0x_08x.
push str.kupdate::KHttpDownload::ReadStateFromCfg
push str.webhttpdownload.cpp
push ebx
mov edx, 0x2ca
call fcn.00402b80
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ed5d
mov esp, ebp
pop ebp
ret 8