Function at 0x10017190
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x100ecdf8]
push ebp
push esi
xor ebp, ebp
xor esi, esi
cmp eax, ebp
jne 0x100171bc
push 0x6a
push str..cryptodesenc_read.c
push 0x4004
call sym.LIBEAY32.dll_CRYPTO_malloc
add esp, 0xc
cmp eax, ebp
mov dword [0x100ecdf8], eax
je 0x10017207
cmp dword [0x100ecde8], ebp
jne 0x100171e1
push 0x6f
push str..cryptodesenc_read.c
push 0x4004
call sym.LIBEAY32.dll_CRYPTO_malloc
add esp, 0xc
cmp eax, ebp
mov dword [0x100ecde8], eax
je 0x10017207
mov eax, dword [0x100ecdec]
cmp eax, ebp
jne 0x1001720d
push 0x74
push str..cryptodesenc_read.c
push 0x4004
call sym.LIBEAY32.dll_CRYPTO_malloc
add esp, 0xc
cmp eax, ebp
mov dword [0x100ecdec], eax
jne 0x1001720d
pop esi
or eax, 0xffffffff
pop ebp
ret
push ebx
mov ebx, dword [0x100ecdf4]
cmp ebx, ebp
push edi
je 0x1001727d
mov edx, dword [esp + 0x1c]
cmp ebx, edx
mov edi, dword [esp + 0x18]
jge 0x1001724f
mov edx, dword [0x100ecdf0]
mov ecx, ebx
lea esi, [edx + eax]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
pop esi
mov dword [0x100ecdf4], ebp
mov dword [0x100ecdf0], ebp
pop ebp
ret
mov ebp, dword [0x100ecdf0]
lea esi, [eax + ebp]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
add ebp, edx
sub ebx, edx
rep movsb byte es:[edi], byte [esi]
pop edi
mov dword [0x100ecdf4], ebx
pop ebx
pop esi
mov dword [0x100ecdf0], ebp
pop ebp
ret
mov eax, dword [esp + 0x1c]
mov edi, 0x4000
cmp eax, edi
jle 0x1001728e
mov dword [esp + 0x1c], edi
mov ebp, dword [esp + 0x14]
mov edx, dword [0x100ecde8]
mov ecx, 4
sub ecx, esi
push ecx
add edx, esi
push edx
push ebp
call dword [sym.imp.MSVCR71.dll__read]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x100172c4
call dword [sym.imp.MSVCR71.dll__errno]
cmp dword [eax], 4
je 0x100172ca
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret
test eax, eax
jle 0x100172bd
add esi, eax
cmp esi, 4
jl 0x10017292
mov ecx, dword [0x100ecde8]
movzx eax, byte [ecx + 1]
movzx ebx, byte [ecx]
lea esi, [ecx + 1]
shl ebx, 0x18
shl eax, 0x10
or ebx, eax
movzx eax, byte [esi + 2]
inc esi
xor edx, edx
mov dh, byte [esi]
or ebx, edx
or ebx, eax
cmp ebx, edi
jg 0x1001747a
test ebx, ebx
jl 0x1001747a
cmp ebx, 8
jge 0x10017310
mov edi, 8
jmp 0x10017321
lea eax, [ebx + 7]
cdq
and edx, 7
add eax, edx
mov edi, eax
sar edi, 3
shl edi, 3
xor esi, esi
test edi, edi
jle 0x10017363
mov edx, edi
sub edx, esi
push edx
add ecx, esi
push ecx
push ebp
call dword [sym.imp.MSVCR71.dll__read]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x1001734f
call dword [sym.imp.MSVCR71.dll__errno]
cmp dword [eax], 4
jne 0x100172bd
jmp 0x10017359
test eax, eax
jle 0x100172bd
add esi, eax
cmp esi, edi
mov ecx, dword [0x100ecde8]
jl 0x10017327
mov ebp, dword [esp + 0x1c]
cmp ebp, ebx
mov al, byte [0x100df574]
push 0
jge 0x100173d9
test al, 1
je 0x1001738f
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [0x100ecdec]
push edx
push ebx
push eax
push ecx
call sym.LIBEAY32.dll_DES_pcbc_encrypt
jmp 0x100173a7
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push edx
mov edx, dword [0x100ecdec]
push eax
push ebx
push edx
push ecx
call sym.LIBEAY32.dll_DES_cbc_encrypt
mov esi, dword [0x100ecdec]
mov edi, dword [esp + 0x30]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
add esp, 0x18
mov ecx, eax
and ecx, 3
sub ebx, ebp
rep movsb byte es:[edi], byte [esi]
pop edi
mov dword [0x100ecdf4], ebx
mov ebx, ebp
pop ebx
pop esi
mov dword [0x100ecdf0], ebp
pop ebp
ret
cmp ebp, edi
jge 0x10017436
test al, 1
je 0x100173fb
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push edx
mov edx, dword [0x100ecdf8]
push eax
push ebx
push edx
push ecx
call sym.LIBEAY32.dll_DES_pcbc_encrypt
jmp 0x10017412
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [0x100ecdf8]
push edx
push ebx
push eax
push ecx
call sym.LIBEAY32.dll_DES_cbc_encrypt
mov esi, dword [0x100ecdf8]
mov edi, dword [esp + 0x30]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
add esp, 0x18
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
test al, 1
je 0x1001745a
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
push edx
push ebx
push eax
push ecx
call sym.LIBEAY32.dll_DES_pcbc_encrypt
add esp, 0x18
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
push eax
push ebx
push edx
push ecx
call sym.LIBEAY32.dll_DES_cbc_encrypt
add esp, 0x18
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
pop edi
pop ebx
pop esi
or eax, 0xffffffff
pop ebp
ret