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

Disassembly:
push 0xffffffffffffffff
push 0x1018eae7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
mov eax, dword [ecx + 0x1c]
push ebx
push ebp
push esi
test eax, eax
push edi
mov dword [esp + 0x1c], ecx
jne 0x100479a1
xor eax, eax
jmp 0x100483a7
lea eax, [esp + 0x18]
push eax
call fcn.10045370
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x18]
mov ebx, eax
call fcn.10077520
cmp ebx, 0xffffffff
je 0x10047aec
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [0x10201328]
test eax, eax
je 0x10047a08
push esi
push str.ReadMailInfo_file_size:_lu_B
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x14
cmp esi, 0xffffffff
je 0x10047b3c
test esi, esi
je 0x10047b3c
mov eax, esi
shr eax, 1
inc eax
lea ecx, [eax + eax]
push ecx
call fcn.1017c342
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x10047b1a
lea ecx, [esi + 2]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push esi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [0x10201328]
test ecx, ecx
je 0x10047a8a
mov ecx, dword [esp + 0x10]
push ecx
push eax
push str.ReadMailInfo_after_read_file__bRead__d___dwRead__lu_
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x60]
call fcn.100a0fd0
xor edi, edi
push ebp
lea ecx, [esp + 0x64]
mov dword [esp + 0x9c], edi
call fcn.100a1d30
push ebp
call fcn.1017c36b
add esp, 4
lea ecx, [esp + 0x60]
call fcn.100a2420
push str.MailInfo
lea ecx, [esp + 0x64]
call fcn.100a1f40
test eax, eax
jne 0x10047b4a
lea ecx, [esp + 0x60]
mov dword [esp + 0x98], 0xffffffff
call fcn.100a1060
xor eax, eax
jmp 0x100483a7
mov eax, dword [0x10201328]
test eax, eax
je 0x10047b43
push str.MailInfo.dat
push str.ReadMailInfo_read_file__s__fail
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x14
xor eax, eax
jmp 0x100483a7
mov eax, dword [0x10201328]
test eax, eax
je 0x10047b3c
push str.ReadMailInfo_new_memory_fail
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x100483a7
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.GUID
lea ecx, [esp + 0x64]
call fcn.100a2080
mov ebp, dword [esp + 0xa0]
test eax, eax
je 0x10047ba2
lea edx, [esp + 0x18]
lea ecx, [esp + 0x60]
push edx
call fcn.100a2580
mov eax, dword [eax]
lea ecx, [ebp + 8]
push ecx
push eax
mov byte [esp + 0xa0], 1
call fcn.1008fe50
add esp, 8
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Direction
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047bea
lea esi, [ebp + 0x18]
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x64]
mov dword [esi], edi
call fcn.100a2580
mov eax, dword [eax]
push esi
push 0x101c0f48
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.MailSize
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047c35
lea esi, [ebp + 0x20]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x64]
mov dword [esi], edi
mov dword [esi + 4], edi
call fcn.100a2580
mov eax, dword [eax]
push esi
push str._I64u
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.From
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047c80
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x64]
call fcn.100a2580
push eax
lea ecx, [ebp + 0x28]
mov byte [esp + 0x9c], 2
call fcn.100776b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push 0x101d1b38
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047ccb
lea edx, [esp + 0x18]
lea ecx, [esp + 0x60]
push edx
call fcn.100a2580
push eax
lea ecx, [ebp + 0x2c]
mov byte [esp + 0x9c], 3
call fcn.100776b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push 0x101d1b30
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047d16
lea eax, [esp + 0x18]
lea ecx, [esp + 0x60]
push eax
call fcn.100a2580
push eax
lea ecx, [ebp + 0x30]
mov byte [esp + 0x9c], 4
call fcn.100776b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Bccs
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047d61
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x64]
call fcn.100a2580
push eax
lea ecx, [ebp + 0x34]
mov byte [esp + 0x9c], 5
call fcn.100776b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Subject
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047dac
lea edx, [esp + 0x18]
lea ecx, [esp + 0x60]
push edx
call fcn.100a2580
push eax
lea ecx, [ebp + 0x38]
mov byte [esp + 0x9c], 6
call fcn.100776b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.HasText
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047e1a
lea eax, [esp + 0x18]
lea ecx, [esp + 0x60]
push eax
mov dword [esp + 0x14], edi
call fcn.100a2580
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push ecx
push 0x101c114c
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.10077520
cmp dword [esp + 0x10], edi
je 0x10047e1a
mov esi, dword [esp + 0x1c]
lea edx, [ebp + 0x3c]
push 1
push edx
mov ecx, esi
call fcn.10048400
lea eax, [ebp + 0x40]
push edi
push eax
mov ecx, esi
call fcn.10048400
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Attach
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x1004837a
lea ecx, [esp + 0x60]
xor edi, edi
call fcn.100a2380
mov eax, dword [0x1019b4e4]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
push 0x101ec534
lea ecx, [esp + 0x58]
mov byte [esp + 0x9c], 9
mov dword [esp + 0x44], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
call fcn.100777a0
push 0x101ec534
lea ecx, [esp + 0x5c]
call fcn.100777a0
push 0x101ec534
lea ecx, [esp + 0x60]
call fcn.100777a0
lea ecx, [esp + 0x60]
mov byte [esp + 0x98], 0xa
call fcn.100a23f0
push 0x101d1afc
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047eea
lea ecx, [esp + 0x20]
mov dword [esp + 0x40], edi
push ecx
lea ecx, [esp + 0x64]
call fcn.100a2580
mov eax, dword [eax]
lea edx, [esp + 0x40]
push edx
push 0x101c0f48
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x20]
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Size
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047f39
lea eax, [esp + 0x24]
lea ecx, [esp + 0x60]
push eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
call fcn.100a2580
mov eax, dword [eax]
lea ecx, [esp + 0x48]
push ecx
push str._I64u
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x24]
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Status
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047f84
lea edx, [esp + 0x28]
lea ecx, [esp + 0x60]
push edx
mov dword [esp + 0x54], edi
call fcn.100a2580
mov eax, dword [eax]
lea ecx, [esp + 0x50]
push ecx
push 0x101c0f48
push eax
call fcn.1005f923
add esp, 0xc
lea ecx, [esp + 0x28]
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Name
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10047fd0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x60]
push edx
call fcn.100a2580
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x9c], 0xb
call fcn.100776b0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x98], 0xa
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.Cache
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x1004801c
lea eax, [esp + 0x30]
lea ecx, [esp + 0x60]
push eax
call fcn.100a2580
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x9c], 0xc
call fcn.100776b0
lea ecx, [esp + 0x30]
mov byte [esp + 0x98], 0xa
call fcn.10077520
lea ecx, [esp + 0x60]
call fcn.100a23f0
push str.DecryptPath
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
je 0x10048068
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x64]
call fcn.100a2580
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x9c], 0xd
call fcn.100776b0
lea ecx, [esp + 0x34]
mov byte [esp + 0x98], 0xa
call fcn.10077520
mov eax, dword [ebp + 0x48]
mov ebx, eax
mov dword [esp + 0x10], ebx
inc ebx
cmp ebx, edi
jne 0x100480ae
mov esi, dword [ebp + 0x44]
cmp esi, edi
je 0x100480a3
mov edx, eax
dec eax
test edx, edx
je 0x10048094
lea ebx, [eax + 1]
mov ecx, esi
call fcn.100463a0
add esi, 0x20
dec ebx
jne 0x10048087
mov eax, dword [ebp + 0x44]
push eax
call fcn.1017c36b
add esp, 4
mov dword [ebp + 0x44], edi
mov dword [ebp + 0x4c], edi
mov dword [ebp + 0x48], edi
jmp 0x100482da
mov ecx, dword [ebp + 0x44]
cmp ecx, edi
jne 0x10048119
mov edi, ebx
shl edi, 5
push edi
call fcn.1017c342
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [ebp + 0x44], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], esi
rep stosb byte es:[edi], al
mov dword [esp + 0x38], esi
test esi, esi
mov byte [esp + 0x98], 0xe
je 0x100480f7
mov ecx, esi
call fcn.10044c10
add esi, 0x20
dec ebx
mov byte [esp + 0x98], 0xa
mov dword [esp + 0x18], esi
jne 0x100480e0
mov eax, dword [esp + 0x10]
inc eax
mov dword [ebp + 0x4c], eax
mov dword [ebp + 0x48], eax
jmp 0x100482da
mov esi, dword [ebp + 0x4c]
cmp ebx, esi
jg 0x100481f6
cmp eax, ebx
jge 0x10048194
mov edx, ebx
sub edx, eax
shl eax, 5
add eax, ecx
mov ecx, edx
shl ecx, 5
mov esi, eax
mov ebx, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
mov dword [esp + 0x18], esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
dec edx
test ecx, ecx
je 0x100481e7
lea edi, [edx + 1]
mov dword [esp + 0x38], esi
test esi, esi
mov byte [esp + 0x98], 0xf
je 0x10048173
mov ecx, esi
call fcn.10044c10
add esi, 0x20
dec edi
mov byte [esp + 0x98], 0xa
mov dword [esp + 0x18], esi
jne 0x1004815c
mov esi, dword [esp + 0x10]
lea eax, [esi + 1]
mov dword [ebp + 0x48], eax
jmp 0x100482de
jle 0x100481e7
mov esi, ebx
sub eax, ebx
shl esi, 5
add esi, ecx
mov edx, eax
dec eax
mov dword [esp + 0x18], esi
test edx, edx
je 0x100481e7
lea edi, [eax + 1]
lea ecx, [esi + 0x1c]
mov byte [esp + 0x98], 0x11
call fcn.10077520
lea ecx, [esi + 0x18]
mov byte [esp + 0x98], 0x10
call fcn.10077520
lea ecx, [esi + 0x14]
mov byte [esp + 0x98], 0xa
call fcn.10077520
add esi, 0x20
dec edi
mov dword [esp + 0x18], esi
jne 0x100481ad
mov esi, dword [esp + 0x10]
lea eax, [esi + 1]
mov dword [ebp + 0x48], eax
jmp 0x100482de
mov ecx, dword [ebp + 0x50]
cmp ecx, edi
jne 0x10048221
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x10048214
mov ecx, 4
jmp 0x10048221
cmp ecx, 0x400
jle 0x10048221
mov ecx, 0x400
lea eax, [esi + ecx]
cmp ebx, eax
jl 0x1004822a
mov eax, ebx
mov dword [esp + 0x18], eax
shl eax, 5
push eax
call fcn.1017c342
mov ecx, dword [ebp + 0x48]
mov esi, dword [ebp + 0x44]
shl ecx, 5
mov dword [esp + 0x18], eax
mov edi, eax
mov eax, ecx
mov edx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x48]
mov ecx, dword [esp + 0x14]
sub edx, eax
shl eax, 5
add eax, ecx
mov ecx, edx
shl ecx, 5
mov esi, eax
mov ebx, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
mov dword [esp + 0x38], esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
dec edx
test ecx, ecx
je 0x100482b8
lea edi, [edx + 1]
mov bl, 0x12
mov dword [esp + 0x3c], esi
test esi, esi
mov byte [esp + 0x98], bl
je 0x100482a6
mov ecx, esi
call fcn.10044c10
add esi, 0x20
dec edi
mov byte [esp + 0x98], 0xa
mov dword [esp + 0x38], esi
jne 0x10048290
mov eax, dword [ebp + 0x44]
push eax
call fcn.1017c36b
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add esp, 4
inc eax
mov dword [ebp + 0x44], edx
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x4c], ecx
mov esi, dword [esp + 0x10]
mov edx, dword [ebp + 0x44]
shl esi, 5
add esi, edx
mov edx, dword [esp + 0x40]
mov dword [esi], edx
mov eax, dword [esp + 0x48]
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x4c]
mov dword [esi + 0xc], ecx
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x54]
lea ecx, [esi + 0x14]
push eax
mov dword [esi + 0x10], edx
call fcn.100776b0
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esi + 0x18]
call fcn.100776b0
lea edx, [esp + 0x5c]
lea ecx, [esi + 0x1c]
push edx
call fcn.100776b0
lea ecx, [esp + 0x60]
call fcn.100a23b0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x98], 0x14
call fcn.10077520
lea ecx, [esp + 0x58]
mov byte [esp + 0x98], 0x13
call fcn.10077520
lea ecx, [esp + 0x54]
mov byte [esp + 0x98], 0
call fcn.10077520
push str.Attach
lea ecx, [esp + 0x64]
call fcn.100a2080
test eax, eax
jne 0x10047e39
mov esi, dword [esp + 0x1c]
push ebp
lea ecx, [esi + 0x28]
call fcn.10044ca0
lea ecx, [esp + 0x60]
mov dword [esi + 0x24], 1
mov dword [esp + 0x98], 0xffffffff
call fcn.100a1060
mov eax, 1
mov ecx, dword [esp + 0x90]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x8c
ret 4