Function at 0x419390
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f758
mov eax, dword fs:[0]
push eax
sub esp, 0x918
mov eax, dword [0x58f660]
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 + 0x24]
mov esi, ecx
mov dword [ebp - 0x91c], esi
mov dword [ebp - 0x918], eax
push 0x3ff
lea ecx, [ebp - 0x913]
push 0
mov dword [ebp - 4], 0
push ecx
mov byte [ebp - 0x914], 0
call fcn.00518380
push 0x3ff
lea edx, [ebp - 0x513]
push 0
push edx
mov byte [ebp - 0x514], 0
call fcn.00518380
push 0x103
lea eax, [ebp - 0x113]
push 0
push eax
mov byte [ebp - 0x114], 0
call fcn.00518380
lea eax, [esi + 0x5c]
lea edx, [ebp - 0x114]
add esp, 0x24
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x419432
mov eax, dword [ebp + 8]
mov ebx, 0x10
cmp dword [ebp + 0x1c], ebx
jae 0x41944c
lea eax, [ebp + 8]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x419450
lea edi, [ebp - 0x114]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x419460
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0
push 0x80
push 3
push 0
mov ecx, eax
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push SysReAllocString
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4194d0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov edi, eax
lea eax, [ebp - 0x924]
push eax
push edi
lea ecx, [ebp - 0x914]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
cmp dword [ebp - 0x924], edi
je 0x4194f0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [ebp + 0x1c], ebx
jb 0x4194e9
mov edx, dword [ebp + 8]
push edx
call fcn.0041f6cd
add esp, 4
mov eax, esi
jmp 0x41969b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx ebx, byte [ebp - 0x8fd]
movzx eax, byte [ebp - 0x8fe]
mov ecx, dword [ebp - 0x91c]
push ecx
shl ebx, 8
mov edx, edi
lea ecx, [ebp - 0x514]
or ebx, eax
call fcn.004197b0
mov esi, eax
mov dword [ebp - 0x920], esi
test esi, esi
je 0x419597
mov edx, dword [ebp - 0x91c]
mov eax, dword [edx + 0x54]
cmp byte [eax + 0x54], 0
push esi
je 0x419540
push 0x56e6e0
jmp 0x419545
push str.Failed_to_read_the_file_CDT._Returned_error:_d
push 0x597e50
call fcn.00515b45
mov eax, 0x597e50
add esp, 0xc
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x419560
mov ecx, dword [ebp - 0x918]
sub eax, edx
push eax
mov eax, 0x597e50
call fcn.00404ab0
cmp dword [ebp + 0x1c], 0x10
jb 0x4194e9
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041f6cd
add esp, 4
mov eax, esi
jmp 0x41969b
xor eax, eax
test edi, edi
je 0x4195f5
lea ecx, [ecx]
cmp byte [ebp + eax - 0x514], 0
jne 0x4195f5
inc eax
cmp eax, edi
jb 0x4195a0
mov edx, dword [ebp - 0x91c]
mov eax, dword [edx + 0x54]
cmp byte [eax + 0x54], 0
mov ecx, dword [ebp - 0x918]
je 0x4195cd
push 0x1e
push 0x56e730
jmp 0x4195d4
push 0x31
push str.CDT_file_is_empty._Please_re_download_the_CDTfile
call fcn.004044c0
cmp dword [ebp + 0x1c], 0x10
jb 0x4195eb
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041f6cd
add esp, 4
mov eax, 1
jmp 0x41969b
movzx edi, byte [ebp - 0x4fd]
movzx esi, byte [ebp - 0x4fb]
movzx edx, byte [ebp - 0x4fe]
movzx eax, byte [ebp - 0x4fc]
lea ecx, [ebp - 0x514]
shl edi, 8
shl esi, 8
push ecx
or edi, edx
or esi, eax
call fcn.00418a00
xor eax, eax
test esi, esi
je 0x419683
lea ecx, [ebp + edi - 0x514]
lea edi, [ebp + ebx - 0x914]
jmp 0x419640
mov dl, byte [ecx + eax]
cmp dl, byte [edi + eax]
jne 0x41964f
inc eax
cmp eax, esi
jb 0x419640
jmp 0x419683
mov eax, dword [ebp - 0x91c]
mov ecx, dword [eax + 0x54]
cmp byte [ecx + 0x54], 0
mov ecx, dword [ebp - 0x918]
je 0x41966d
push 0x16
push 0x56e784
jmp 0x419674
push 0x2b
push str.The_software_does_no_match_the_phone_model_
call fcn.004044c0
mov dword [ebp - 0x920], 1
cmp dword [ebp + 0x1c], 0x10
jb 0x419695
mov edx, dword [ebp + 8]
push edx
call fcn.0041f6cd
add esp, 4
mov eax, dword [ebp - 0x920]
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.00514194
mov esp, ebp
pop ebp
ret 0x20