Function at 0x42be30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459060
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
push str.read_SMS_from_file:_Begin_n
push 2
push 2
mov dword [ebp - 0x14], ebx
call fcn.004048e0
mov edi, dword [ebp + 0x14]
add esp, 0xc
test edi, edi
je 0x42bf35
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x42bf35
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [ebp - 0x11c]
and ecx, 3
mov dword [ebp - 4], 0
rep stosb byte es:[edi], al
lea edi, [ebx + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov eax, edi
sub eax, 0
je 0x42bf9f
dec eax
je 0x42bf4c
dec eax
jne 0x42bffb
mov eax, dword [ebx + 0x6118]
mov ebx, dword [ebp + 0xc]
cmp ebx, eax
jae 0x42bf20
mov edi, str.Sent
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x14]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x6130]
jmp 0x42bfe9
push 0
push eax
push ebx
push str.read_SMS_from_file:_SMSSentbox_index_out_or_range_index__d__Total__d
push 1
push 2
call fcn.004048e0
add esp, 0x18
mov ax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 0x6114]
mov ebx, dword [ebp + 0xc]
cmp ebx, eax
jae 0x42bf94
mov edi, 0x476e18
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x14]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x612c]
jmp 0x42bfe9
push 0
push eax
push ebx
push str.read_SMS_from_file:_SMSOutbox_index_out_or_range_index__d__Total__d
jmp 0x42bf29
mov eax, dword [ebx + 0x610c]
mov ebx, dword [ebp + 0xc]
cmp ebx, eax
jae 0x42c151
mov edi, 0x476e14
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x14]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x6128]
mov edx, dword [ecx + ebx*8]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ecx + ebx*8 + 4]
mov dword [ebp - 0x18], eax
jmp 0x42bffe
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0x11c]
push 0x476e0c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
mov dword [ebp + 8], esi
jne 0x42c029
push eax
push ebx
push edi
push str.read_SMS_from_file:_Error_opening_SMS_file_for_read.__Box_ID__d__index__d
jmp 0x42bf29
push esi
call dword [sym.imp.MSVCRT.dll_rewind]
lea edx, [ebp - 0x1c]
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fsetpos]
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
push esi
je 0x42c064
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp + 8], 0
push 0
push ebx
push edi
push str.read_SMS_from_file:_EOF_on_SMS_file_for_read.__Box_ID__d__index__d
jmp 0x42bf29
mov eax, dword [ebp + 0x10]
push 1
push 2
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x42c099
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp + 8], 0
push 0
push ebx
push edi
push str.read_SMS_from_file:_Error_reading_state.__Box_ID__d__index__d
jmp 0x42bf29
mov ecx, dword [ebp + 0x10]
cmp word [ecx], 0xea60
je 0x42c0ef
mov ecx, dword [ebp + 0x18]
mov eax, 0x1f4
cmp ecx, eax
jbe 0x42c0b2
mov dword [ebp + 0x18], eax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push esi
push ecx
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [ebp + 0x18]
add esp, 0x10
cmp eax, ecx
je 0x42c0ec
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp + 8], 0
push 0
push ebx
push edi
push str.read_SMS_from_file:_Error_reading_message.__Box_ID__d__index__d
jmp 0x42bf29
mov ecx, dword [ebp + 0x10]
test edi, edi
jne 0x42c119
mov ax, word [ecx]
cmp ax, 0xeac5
je 0x42c102
cmp ax, 0xeac6
jne 0x42c119
add eax, 0xffffff9c
mov word [ecx], ax
mov ecx, dword [ebp - 0x14]
and eax, 0xffff
push eax
push ebx
push 0
call fcn.0042cdf0
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp - 4], 0xffffffff
push str.read_SMS_from_file:_End_n
push 2
push 2
call fcn.004048e0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
xor ax, ax
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0
push eax
push ebx
push str.read_SMS_from_file:_SMSInbox_index_out_or_range_index__d__Total__d
jmp 0x42bf29