Function at 0x10024e00
Capabilities:
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1024d520
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebp
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x10], edi
cmp dword [edi + 0x308], ebp
je 0x10025307
cmp dword [edi + 0x30c], ebp
jne 0x10025307
push ebx
lea eax, [esp + 0x18]
push esi
push eax
lea ecx, [edi + 0x1f0]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], ebp
call fcn.1004c6c0
lea esi, [edi + 0x1bc]
push eax
mov ecx, esi
mov dword [esp + 0x38], ebp
call fcn.100836f0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xffffffff
call fcn.10083560
mov eax, dword [esi]
mov ecx, dword [edi + 0x1b8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x100252c3
mov esi, dword [esi]
push ebp
push ebp
push 3
push ebp
push 3
push connect
push esi
mov dword [esp + 0x44], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov eax, dword [0x102f7658]
cmp eax, ebp
mov dword [esp + 0x20], esi
je 0x10024ed5
push esi
push str.CSMTPHandler::DecodeCacheMail_1__hFile:_p_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
cmp esi, 0xffffffff
je 0x10025241
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebp
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [0x102f7658]
cmp eax, ebp
je 0x10024f18
mov edx, dword [esp + 0x24]
push edx
push ebx
push str.CSMTPHandler::DecodeCacheMail_2__FileSizeL:_d__FileSizeH:_d_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
mov eax, dword [esp + 0x24]
cmp eax, ebp
jne 0x10024f2a
cmp ebx, ebp
je 0x100252fb
jmp 0x10024f30
ja 0x100252fb
cmp ebx, 0x40
jb 0x100252fb
cmp ebx, 0x6400000
ja 0x100252fb
lea esi, [ebx + 1]
push esi
call fcn.1023d8fc
mov ebp, eax
mov eax, dword [0x102f7658]
add esp, 4
test eax, eax
je 0x10024f76
push ebp
push str.CSMTPHandler::DecodeCacheMail_3__bufInput:_p_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
test ebp, ebp
je 0x100252f7
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor esi, esi
and ecx, 3
push esi
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
push ebx
push ebp
push edi
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10024fda
add esi, dword [esp + 0x1c]
cmp esi, ebx
jae 0x10024ffc
mov edx, ebx
lea ecx, [esp + 0x1c]
push 0
sub edx, esi
push ecx
lea eax, [esi + ebp]
push edx
push eax
push edi
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10024faf
mov eax, dword [0x102f7658]
test eax, eax
je 0x10024ffc
push str.CSMTPHandler::DecodeCacheMail_ReadFail____
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x102f7658]
test eax, eax
je 0x10025026
push esi
push str.CSMTPHandler::DecodeCacheMail_4__dwReadAll:_d_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
cmp esi, ebx
jne 0x1002523d
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
push ebx
push ebp
mov ecx, 0x102f4588
mov dword [esp + 0x20], 0
call fcn.1005e160
mov esi, eax
mov eax, dword [0x102f7658]
test eax, eax
je 0x1002507b
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push esi
push str.CSMTPHandler::DecodeCacheMail_5_1__Decode:_d__bufOutput:_p__nBufOutputLen:_d_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x1c
test esi, esi
je 0x1002523d
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1002523d
cmp eax, 5
jle 0x1002513b
push str._r_n._r_n
call fcn.1006b93e
add esp, 4
push eax
push str._r_n._r_n
call fcn.1006b93e
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
add ecx, edx
add esp, 4
sub ecx, eax
push ecx
lea ecx, [esp + 0x24]
call fcn.10083010
mov edx, dword [esp + 0x1c]
push str._r_n._r_n
push edx
mov dword [esp + 0x3c], 1
call fcn.1006b991
add esp, 8
test eax, eax
jne 0x100250fe
push str._r_n._r_n
call fcn.1006b93e
mov ecx, dword [esp + 0x14]
add esp, 4
sub ecx, eax
mov dword [esp + 0x10], ecx
mov eax, dword [0x102f7658]
test eax, eax
je 0x1002512a
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push str.CSMTPHandler::DecodeCacheMail_5_2__nBufOutputLen:_d__End:_s_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xffffffff
call fcn.10083560
mov esi, dword [esp + 0x18]
push 0
push 0
push 2
mov eax, dword [esi + 0x1b8]
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov eax, dword [0x102f7658]
test eax, eax
je 0x10025187
mov edx, dword [esi + 0x1b8]
push edx
push ebx
push str.CSMTPHandler::DecodeCacheMail_6__hFile:_p__CacheMail:_s_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
cmp ebx, 0xffffffff
je 0x1002523d
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
lea eax, [esp + 0x20]
push edi
push eax
push ecx
push edx
push ebx
xor esi, esi
mov dword [esp + 0x34], edi
call ebp
test eax, eax
je 0x100251df
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
add esi, edx
cmp esi, eax
jge 0x10025200
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push edi
sub eax, esi
push ecx
push eax
lea eax, [esi + edx]
mov dword [esp + 0x2c], edi
push eax
push ebx
call ebp
test eax, eax
jne 0x100251b5
cmp dword [0x102f7658], edi
je 0x10025200
push str.CSMTPHandler::DecodeCacheMail_WriteFail____
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x102f7658], edi
je 0x10025229
push esi
push str.CSMTPHandler::DecodeCacheMail_7__dwWriteAll:_d_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
cmp esi, dword [esp + 0x10]
jne 0x1002523d
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0x30c], 1
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
pop ebx
je 0x10025262
lea ecx, [esp + 0xc]
push ecx
mov ecx, 0x102f4588
call fcn.1005e220
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100252ac
mov eax, dword [edi + 0x30c]
test eax, eax
jne 0x100252ac
mov eax, dword [edi + 0x1b8]
mov ecx, dword [edi + 0x1bc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, dword [0x102f7658]
test ecx, ecx
je 0x100252ac
push eax
push str.CSMTPHandler::DecodeCacheMail_Restore___d_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x14
mov eax, dword [edi + 0x30c]
pop edi
pop ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp dword [0x102f7658], ebp
je 0x10025241
mov edx, dword [esi]
mov eax, dword [edi + 0x1b8]
push edx
push eax
push str.CSMTPHandler::DecodeCacheMail_MoveFile_Fail_____s___s_
push 0x102acaa4
push 0xffffffffffffffff
push 0x102f6dc4
call fcn.10098fb0
add esp, 0x18
jmp 0x10025241
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10025241
mov ecx, dword [esp + 0x24]
pop edi
mov eax, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x28
ret