Function at 0x42c190
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459070
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x31c
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
push str.write_SMS_to_file:_Begin_n
xor esi, esi
push 2
push 2
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x14], esi
call fcn.004048e0
mov eax, dword [ebp + 0x18]
add esp, 0xc
cmp eax, esi
je 0x42c1d8
mov dword [eax], esi
cmp dword [ebp + 0xc], esi
je 0x42c37c
cmp dword [ebp + 0x10], esi
je 0x42c37c
mov eax, dword [ebx + 0x610c]
mov ecx, dword [ebx + 0x6110]
cmp eax, ecx
jb 0x42c211
mov ax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea edi, [ebx + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 4], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x134]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
sub eax, 0
rep movsb byte es:[edi], byte [esi]
je 0x42c2e9
dec eax
je 0x42c29e
dec eax
jne 0x42c32b
mov edi, str.Sent
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp + 0x14], 0xea67
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 ecx, edx
lea eax, [ebx + 0x6118]
and ecx, 3
add ebx, 0x6130
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], ebx
jmp 0x42c32b
mov edi, 0x476e18
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp + 0x14], 0xea66
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 ecx, edx
lea eax, [ebx + 0x6114]
and ecx, 3
add ebx, 0x612c
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], ebx
jmp 0x42c32b
mov edi, 0x476e14
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x134]
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 ecx, edx
lea eax, [ebx + 0x610c]
and ecx, 3
add ebx, 0x6128
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], ebx
mov esi, dword [sym.imp.MSVCRT.dll_fopen]
lea eax, [ebp - 0x134]
push 0x477484
push eax
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x42c393
lea ecx, [ebp - 0x134]
push 0x476f24
push ecx
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x42c393
mov edx, dword [ebp + 8]
push eax
push eax
push edx
push str.write_SMS_to_file:_Error_creating_SMS_file_for_write.__Box_ID__d__index__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
push ebx
mov dword [ebp - 0x28], 3
call dword [sym.imp.MSVCRT.dll_rewind]
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fgetpos]
mov esi, dword [sym.imp.MSVCRT.dll_fsetpos]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
add esp, 0xc
mov dword [ebp - 0x34], 0xea60
lea ecx, [ebp - 0x20]
push ecx
push ebx
call esi
push ebx
push 1
lea edx, [ebp - 0x34]
push 2
push edx
call edi
add esp, 0x18
cmp eax, 1
je 0x42c4bb
mov dword [ebp - 0x34], 0xea60
lea eax, [ebp - 0x20]
push eax
push ebx
call esi
push ebx
push 1
lea ecx, [ebp + 0x14]
push 2
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x18
cmp eax, 1
jne 0x42c5aa
mov ecx, 0x7d
xor eax, eax
lea edi, [ebp - 0x328]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x1f4
jbe 0x42c428
mov ecx, 0x1f4
mov esi, dword [ebp + 0xc]
mov edx, ecx
lea edi, [ebp - 0x328]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x1f4
and ecx, 3
lea eax, [ebp - 0x328]
push 1
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 0x1f4
jne 0x42c5aa
mov esi, dword [ebp - 0x2c]
mov edi, dword [esi]
inc edi
mov dword [esi], edi
mov eax, edi
mov edi, dword [ebp - 0x24]
lea ecx, [eax*8]
mov edx, dword [edi]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x42c4ef
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
push esi
call fcn.0042b530
test eax, eax
jne 0x42c4e1
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [ebp - 0x18], 0
push 0
push eax
push esi
push str.write_SMS_to_file:_Error_reallocating_smsBuf_and_reading_SMS_stat_file.__Box_ID__d__index__d
jmp 0x42c547
cmp word [ebp - 0x34], 0xea60
je 0x42c3e7
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
add ecx, 0x1f6
adc eax, 0
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
jmp 0x42c3c2
mov ecx, dword [ebp - 0x14]
push 0
push ecx
push esi
push str.write_SMS_to_file:_Error_reallocating_smsBuf.__Box_ID__d__index__d
jmp 0x42c547
mov edx, dword [esi]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
mov dword [eax + edx*8 - 8], ecx
mov ecx, dword [ebp - 0x1c]
push edi
mov dword [eax + edx*8 - 4], ecx
mov ecx, dword [ebp - 0x30]
call fcn.0042b8a0
test eax, eax
jne 0x42c56a
mov ecx, dword [ebp - 0x30]
push edi
call fcn.0042b530
test eax, eax
jne 0x42c53b
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [ebp - 0x14]
add esp, 4
mov dword [ebp - 0x18], 0
push 0
push edx
push edi
push str.write_SMS_to_file:_Error_updating_SMS_stat_file_and_reading_the_stat_file.__Box_ID__d__index__d
jmp 0x42c547
mov eax, dword [ebp - 0x14]
push 0
push eax
push edi
push str.write_SMS_to_file:_Error_updating_SMS_stat_file.__Box_ID__d__index__d
push 1
push 2
call fcn.004048e0
add esp, 0x18
mov ax, 3
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 [ebp + 0x18]
test eax, eax
je 0x42c576
mov ecx, dword [esi]
dec ecx
mov dword [eax], ecx
mov dword [ebp - 0x28], 0
jmp 0x42c5aa
test ebx, ebx
mov dword [ebp - 4], 0xffffffff
je 0x42c5bf
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push str.write_SMS_to_file:_End_n
push 2
push 2
call fcn.004048e0
mov ecx, dword [ebp - 0xc]
mov ax, word [ebp - 0x28]
add esp, 0xc
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14