Function at 0x1003a750
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xa0], eax
mov ecx, esi
call fcn.10040f1e
or eax, dword [ebx]
mov dword [ebx], eax
mov dword [esp], eax
mov ecx, edi
call fcn.10040ece
sub esp, 4
mov ecx, edi
call fcn.10040d82
test al, 0x80
je 0x1003a7bb
mov ecx, esi
mov esi, ebx
mov ebx, dword [esi]
call fcn.10040d82
and eax, 3
mov dword [esp + 4], ebx
mov ebx, esi
mov dword [esp], eax
mov ecx, edi
call fcn.10040eea
sub esp, 8
jmp 0x1003a7e1
mov ecx, edi
call fcn.10040ec6
cmp dword [eax], 0
je 0x1003a7d2
mov ecx, edi
call fcn.10040f1e
test eax, eax
jne 0x1003a7e1
mov eax, dword [ebx]
mov dword [esp], eax
mov ecx, edi
call fcn.10040edc
sub esp, 4
mov eax, dword [ebx]
and eax, 0x800000
mov esi, ebx
mov ebx, 0x800001
cmove ebx, eax
mov dword [esp + 4], edi
mov dword [esp + 8], 0
mov dword [esp], 1
lea ecx, [esp + 0x68]
call fcn.10040d90
sub esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov ebx, esi
mov dword [esp + 8], 0
lea esi, [esp + 0x30]
mov ecx, esi
call fcn.10040d90
sub esp, 0xc
mov ecx, esi
call fcn.10040f2a
mov ecx, dword [ebx + 8]
mov dword [eax + 8], ecx
movsd xmm0, qword [ebx]
movsd qword [eax], xmm0
mov edx, dword [ebx]
test edx, 0x20000
je 0x1003a918
test edx, 0x200000
je 0x1003a8a3
call fcn.10040fc0
and eax, 0x3f
mov edx, dword [ebx]
mov dword [esp], eax
lea ecx, [esp + 0xa0]
call fcn.10040f40
sub esp, 4
mov ecx, dword [ebp + 0x18]
mov esi, ecx
movzx eax, byte [esi + eax]
mov dword [esp], eax
lea ecx, [esp + 0x68]
mov edi, ecx
call fcn.100399de
sub esp, 4
call fcn.10040fc0
and eax, 0x3f
mov edx, dword [ebx]
mov dword [esp], eax
jmp 0x1003a8dc
mov dword [esp], 0
lea ecx, [esp + 0xa0]
call fcn.10040f40
sub esp, 4
mov ecx, dword [ebp + 0x18]
mov esi, ecx
movzx eax, byte [esi + eax]
mov dword [esp], eax
lea ecx, [esp + 0x68]
mov edi, ecx
call fcn.100399de
sub esp, 4
mov edx, dword [ebx]
mov dword [esp], 0
lea ecx, [esp + 0xa0]
call fcn.10040f40
sub esp, 4
movzx eax, byte [esi + eax]
mov dword [esp], eax
mov ecx, edi
call fcn.100399de
sub esp, 4
mov esi, dword [esp + 0xa0]
mov edx, 0x10
mov ecx, esi
call fcn.10040ff0
xor eax, esi
mov dword [esp + 0xa0], eax
mov dword [esp + 0x2c], 0
lea ecx, [esp + 0x30]
call fcn.10040e7c
test eax, eax
je 0x1003abc9
xor edi, edi
lea ebx, [esp + 0x30]
nop word [eax + eax]
mov dword [esp + 0x2c], 0
lea eax, [esp + 0x2c]
mov esi, eax
mov dword [esp], esi
mov ecx, ebx
call fcn.10039cae
sub esp, 4
mov dword [esp + 0x20], eax
mov dword [esp], esi
mov ecx, ebx
call fcn.10039cae
sub esp, 4
mov dword [esp + 0x24], eax
mov dword [esp], esi
mov ecx, ebx
call fcn.10039cae
sub esp, 4
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x20]
mov eax, esi
shr eax, 2
and eax, 0x3f
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov dword [esp], eax
lea eax, [esp + 0xa0]
mov ecx, eax
call fcn.10040f40
sub esp, 4
mov ecx, dword [ebp + 0x18]
mov ebx, ecx
movzx eax, byte [ebx + eax]
mov dword [esp], eax
lea eax, [esp + 0x68]
mov ecx, eax
call fcn.100399de
sub esp, 4
mov eax, esi
shl eax, 4
and eax, 0x30
mov ecx, eax
mov eax, dword [esp + 0x24]
shr eax, 4
and eax, 0xf
add eax, ecx
mov esi, ebx
mov ebx, dword [ebp + 0x10]
mov edx, dword [ebx]
mov dword [esp], eax
lea ecx, [esp + 0xa0]
lea ebx, [esp + 0x68]
call fcn.10040f40
sub esp, 4
movzx eax, byte [esi + eax]
mov dword [esp], eax
mov ecx, ebx
call fcn.100399de
sub esp, 4
cmp dword [esp + 0x2c], 2
jl 0x1003aa83
mov eax, dword [esp + 0x24]
lea eax, [eax*4]
and eax, 0x3c
mov ecx, dword [esp + 0x28]
shr ecx, 6
and ecx, 3
add ecx, eax
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov dword [esp], ecx
lea ecx, [esp + 0xa0]
call fcn.10040f40
sub esp, 4
movzx eax, byte [esi + eax]
mov dword [esp], eax
mov ecx, ebx
call fcn.100399de
sub esp, 4
cmp dword [esp + 0x2c], 3
jl 0x1003aa83
mov eax, dword [esp + 0x28]
and eax, 0x3f
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov dword [esp], eax
lea ecx, [esp + 0xa0]
call fcn.10040f40
sub esp, 4
movzx eax, byte [esi + eax]
mov dword [esp], eax
mov ecx, ebx
call fcn.100399de
sub esp, 4
mov eax, dword [esp + 0x28]
and eax, 0xaa
cmp eax, 1
sbb edi, 0xffffffff
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, 0x420000
and eax, edx
cmp eax, 0x420000
jne 0x1003ab4d
cmp edi, dword [0x1005d71c]
jbe 0x1003ab4d
mov eax, dword [esp + 0x24]
movzx edi, al
cmp dword [0x1022bfa0], 0
jne 0x1003aaf5
mov dword [esp], 0x18
call fcn.100027fa
mov esi, eax
mov dword [esp + 4], 0x16
mov dword [esp], 0x1005d6e4
mov ecx, esi
call fcn.1003ac2a
sub esp, 8
mov dword [0x1022bfa0], esi
call fcn.10040fc0
add eax, edi
movzx ecx, byte [0x1005d718]
xor edx, edx
div ecx
mov esi, edx
add esi, 0x3e8
nop
call fcn.10040fc0
mov edi, eax
mov ebx, dword [0x1022bfa0]
mov ecx, ebx
call fcn.10040ec6
mov ecx, eax
xor edx, edx
mov eax, edi
div dword [ecx]
mov edi, edx
mov ecx, ebx
call fcn.10040ebe
movzx eax, byte [eax + edi]
mov dword [esp], eax
lea ecx, [esp + 0x68]
call fcn.100399de
sub esp, 4
xor edi, edi
dec esi
jne 0x1003ab10
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
mov ecx, 0x60000
and eax, ecx
cmp eax, 0x60000
mov ecx, dword [esp + 0x28]
jne 0x1003abb6
mov eax, ecx
and eax, 7
cmp eax, 7
jne 0x1003abb6
and ecx, 0xa0
cmp ecx, 0xa0
jne 0x1003ab90
mov dword [esp], 0x20
lea ecx, [esp + 0x68]
jmp 0x1003abae
mov dword [esp], 0xd
lea esi, [esp + 0x68]
mov ecx, esi
call fcn.100399de
sub esp, 4
mov dword [esp], 0xa
mov ecx, esi
call fcn.100399de
sub esp, 4
lea ebx, [esp + 0x30]
mov ecx, ebx
call fcn.10040e7c
test eax, eax
jne 0x1003a940
mov eax, dword [ebp + 0x10]
test byte [eax + 2], 1
je 0x1003ac0f
mov eax, 3
cmp eax, dword [esp + 0x2c]
jle 0x1003ac0f
xor edi, edi
lea esi, [esp + 0x68]
nop word cs:[eax + eax]
mov dword [esp], 0x3d
mov ecx, esi
call fcn.100399de
sub esp, 4
inc edi
mov eax, 3
sub eax, dword [esp + 0x2c]
cmp edi, eax
jl 0x1003abf0
lea ecx, [esp + 0x68]
call fcn.10039e96
movzx eax, al
lea eax, [eax*4 - 4]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret