Function at 0x514770
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4e8
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0xc], esi
mov edx, dword [esi + 0x254]
cmp edx, ebx
jne 0x514796
cmp dword [esi + 0x29c], ebx
je 0x514a1d
push ebp
push edi
mov ecx, 0x38
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x29c]
lea ecx, [esp + 0xf8]
push eax
push edx
push 0x5965b8
push str._smailbox_d._d
push 0x3ff
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [esp + 0x110]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 0x20
cmp ebp, ebx
mov dword [esp + 0x10], ebp
je 0x5149e6
push ebp
push 1
lea eax, [esp + 0x20]
push 0xe0
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x51481b
mov ecx, 0x38
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
jmp 0x5149dc
mov eax, dword [esp + 0xec]
cmp eax, ebx
jle 0x5149dc
cmp eax, 0x1f400
jge 0x5149dc
add eax, 0xa
push eax
call fcn.004c2e90
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x5149dc
mov ecx, dword [esp + 0xec]
push ebp
push 1
push ecx
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x51486c
mov dword [esp + 0xec], ebx
mov edx, dword [esp + 0xec]
mov byte [edi + edx], 0
mov eax, dword [esp + 0xec]
lea ecx, [eax + eax + 0xe0]
push ecx
call fcn.004c2e90
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x51499d
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_gmtime]
add esp, 4
test eax, eax
je 0x5148de
mov edx, dword [eax + 4]
lea ecx, [esp + 0x64]
push ecx
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 0xc]
push ecx
mov ecx, dword [eax + 0x10]
push edx
mov edx, dword [eax + 0x14]
inc ecx
add edx, 0x76c
push ecx
lea eax, [esp + 0x34]
push edx
push eax
push str.___From:_____s_r_n___Date:_____04d._02d._02d__02d:_02d_r_n___Subject:__s_r_n
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x24
cmp byte [edi], 0x3c
je 0x514984
push 3
push 0x590078
push ebp
call dword [sym.imp.MSVCRT.dll_strncat]
mov ecx, dword [esp + 0xf8]
add esp, 0xc
test ecx, ecx
mov esi, edi
jle 0x514980
cmp ebx, 0x400
jge 0x514980
mov edx, esi
xor ebx, ebx
sub edx, edi
cmp edx, ecx
jge 0x514942
cmp ebx, 0x400
jge 0x514942
mov al, byte [esi]
cmp al, 0xd
je 0x51493c
cmp al, 0xa
je 0x514941
inc esi
mov byte [esp + ebx + 0xf8], al
mov eax, esi
inc ebx
sub eax, edi
cmp eax, ecx
jl 0x514917
jmp 0x514942
add esi, 2
jmp 0x514942
inc esi
push 3
push 0x590074
push ebp
call dword [sym.imp.MSVCRT.dll_strncat]
lea ecx, [esp + 0x104]
push ebx
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_strncat]
push 2
push 0x58368c
push ebp
call dword [sym.imp.MSVCRT.dll_strncat]
mov ecx, dword [esp + 0x110]
mov edx, esi
sub edx, edi
add esp, 0x24
cmp edx, ecx
jl 0x514905
mov esi, dword [esp + 0x14]
lea ebx, [esi + 0x4e8]
push ebp
mov ecx, ebx
call sub.MFC42.DLL_CWnd::SetWindowTextA
push ebp
call fcn.004c2eb0
add esp, 4
jmp 0x5149ab
lea ebx, [esi + 0x4e8]
push edi
mov ecx, ebx
call sub.MFC42.DLL_CWnd::SetWindowTextA
mov eax, dword [ebx + 0x20]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0xffffffffffffffff
push 0xb1
push eax
call ebp
mov ecx, dword [ebx + 0x20]
push 0
push 0
push 0xb7
push ecx
call ebp
push edi
call fcn.004c2eb0
mov ebp, dword [esp + 0x14]
add esp, 4
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea edx, [esi + 0x2a0]
lea eax, [esp + 0xf8]
push edx
push str.Re:__s
push 0x3ff
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [esp + 0xf8]
push ecx
lea ecx, [esi + 0x4a8]
call sub.MFC42.DLL_CWnd::SetWindowTextA
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x4e8
ret