Function at 0x46f272
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x44], esi
push edi
test ebx, ebx
jne 0x46f295
mov eax, 0x80004003
jmp 0x46f8b7
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x46f28b
mov edx, dword [ebp + 0x10]
xor eax, eax
test edx, edx
jne 0x46f2a9
mov dword [ecx], eax
jmp 0x46f2ab
mov eax, dword [ecx]
mov ecx, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call fcn.0046bd12
test eax, eax
je 0x46f335
lea eax, [esp + 0x34]
push eax
cmp ebx, edx
jne 0x46f321
xor ebx, ebx
push ebx
call fcn.00472f6b
test eax, eax
js 0x46f8b7
lea eax, [esp + 0x44]
mov ecx, esi
push eax
push ebx
call fcn.00472fa8
test eax, eax
js 0x46f8b7
mov eax, dword [ebp + 0xc]
mov esi, dword [esp + 0x34]
sub eax, esi
cmp dword [ebp + 0xc], eax
jge 0x46f304
mov eax, 0x80004005
jmp 0x46f8b7
mov ecx, eax
sub ecx, dword [esp + 0x44]
mov dword [esp + 0x2c], ecx
cmp eax, ecx
jl 0x46f2fa
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x2c]
lea ecx, [ecx + esi*2]
mov dword [ebp + 8], ecx
jmp 0x46f33e
push edx
call fcn.00472f6b
test eax, eax
js 0x46f8b7
mov esi, dword [esp + 0x34]
jmp 0x46f337
xor esi, esi
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
mov edx, dword [ebp + 0x18]
or ebx, 0xffffffff
and edx, 0x20
mov byte [esp + 0x12], 0
mov dword [esp + 0x3c], edx
xor edi, edi
or edx, ebx
mov dword [esp + 0x18], edx
test eax, eax
jle 0x46f847
mov ecx, dword [ebp + 8]
mov dword [esp + 0x44], 0x3f
movzx edx, word [ecx + edi*2]
mov dword [esp + 0x28], edx
cmp dx, word [esp + 0x44]
je 0x46f80e
push 0x25
pop edx
cmp word [esp + 0x28], dx
mov edx, dword [esp + 0x18]
jne 0x46f821
add eax, 0xfffffffe
cmp edi, eax
jge 0x46f821
movzx eax, word [ecx + edi*2 + 2]
mov ecx, eax
mov dword [esp + 0x40], eax
call fcn.0043c9c4
test eax, eax
je 0x46f821
mov eax, dword [ebp + 8]
movzx eax, word [eax + edi*2 + 4]
mov ecx, eax
mov dword [esp + 0x38], eax
call fcn.0043c9c4
test eax, eax
je 0x46f821
mov ecx, dword [esp + 0x40]
call fcn.0043ca1c
mov ecx, dword [esp + 0x38]
shl al, 4
mov dword [esp + 0x1c], eax
call fcn.0043ca1c
mov ecx, dword [esp + 0x1c]
add cl, al
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x13], cl
je 0x46f821
cmp cl, 0x7f
jbe 0x46f7d9
cmp dword [esp + 0x3c], 0
je 0x46f692
cmp ebx, 0xffffffff
mov eax, edi
cmovne eax, ebx
cmp edx, 0xffffffff
mov ebx, eax
mov eax, esi
cmovne eax, edx
mov ecx, ebx
mov edx, eax
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x2c]
add eax, 0xfffffffa
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], edx
cmp edi, eax
jg 0x46f68e
mov ecx, dword [ebp + 8]
push 0x25
pop eax
mov dword [esp + 0x18], edx
cmp word [ecx + edi*2 + 6], ax
mov ecx, ebx
mov eax, edx
jne 0x46f68e
mov edx, dword [ebp + 8]
movzx edx, word [edx + edi*2 + 8]
mov dword [esp + 0x38], edx
mov edx, eax
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], edx
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], edx
movzx eax, word [eax + edi*2 + 0xa]
mov ecx, eax
mov dword [esp + 0x40], eax
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov ecx, dword [esp + 0x38]
call fcn.0043ca1c
mov ecx, dword [esp + 0x40]
mov edx, eax
shl dl, 4
call fcn.0043ca1c
add dl, al
mov dword [esp + 0x34], edx
mov cl, byte [esp + 0x34]
mov edx, dword [esp + 0x20]
and cl, 0xc0
cmp cl, 0x80
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x1c]
jne 0x46f692
mov al, cl
mov dword [esp + 0x18], edx
and al, 0xe0
cmp al, 0xc0
je 0x46f777
mov eax, dword [esp + 0x2c]
mov ecx, ebx
add eax, 0xfffffff7
cmp edi, eax
jg 0x46f68e
mov ecx, dword [ebp + 8]
push 0x25
pop eax
mov dword [esp + 0x18], edx
cmp word [ecx + edi*2 + 0xc], ax
mov ecx, ebx
mov eax, edx
jne 0x46f68e
mov edx, dword [ebp + 8]
movzx edx, word [edx + edi*2 + 0xe]
mov dword [esp + 0x38], edx
mov edx, eax
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], edx
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], edx
movzx eax, word [eax + edi*2 + 0x10]
mov ecx, eax
mov dword [esp + 0x40], eax
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov ecx, dword [esp + 0x38]
call fcn.0043ca1c
mov ecx, dword [esp + 0x40]
mov edx, eax
shl dl, 4
call fcn.0043ca1c
add dl, al
mov dword [esp + 0x38], edx
mov cl, byte [esp + 0x38]
mov edx, dword [esp + 0x20]
and cl, 0xc0
mov dword [esp + 0x18], edx
cmp cl, 0x80
jne 0x46f68e
mov edx, dword [esp + 0x1c]
mov al, dl
and al, 0xf0
cmp al, 0xe0
je 0x46f73d
mov eax, dword [esp + 0x2c]
mov ecx, ebx
mov edx, dword [esp + 0x20]
add eax, 0xfffffff4
mov dword [esp + 0x18], edx
cmp edi, eax
jg 0x46f68e
mov ecx, dword [ebp + 8]
push 0x25
pop eax
mov dword [esp + 0x18], edx
cmp word [ecx + edi*2 + 0x12], ax
mov ecx, ebx
mov eax, edx
jne 0x46f68e
mov edx, dword [ebp + 8]
movzx edx, word [edx + edi*2 + 0x14]
mov dword [esp + 0x40], edx
mov edx, eax
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x18], edx
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], edx
movzx eax, word [eax + edi*2 + 0x16]
mov ecx, eax
mov dword [esp + 0x4c], eax
call fcn.0043c9c4
test eax, eax
je 0x46f68e
mov ecx, dword [esp + 0x40]
call fcn.0043ca1c
mov ecx, dword [esp + 0x4c]
mov edx, eax
shl dl, 4
call fcn.0043ca1c
add dl, al
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], edx
mov edx, eax
mov cl, byte [esp + 0x40]
and cl, 0xc0
mov dword [esp + 0x18], edx
cmp cl, 0x80
jne 0x46f68e
mov al, byte [esp + 0x1c]
mov ecx, ebx
and al, 0xf8
mov dword [esp + 0x18], edx
cmp al, 0xf0
jne 0x46f68e
lea eax, [esi + 2]
mov dword [esp + 0x18], edx
cmp eax, dword [esp + 0x30]
jg 0x46f68e
mov eax, dword [esp + 0x34]
movzx edx, al
mov eax, dword [esp + 0x1c]
shr edx, 4
movzx eax, al
and edx, 3
and eax, 7
shl eax, 2
or edx, eax
dec edx
mov dword [esp + 0x4c], edx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
cmp ecx, 0x10000
jl 0x46f6dd
mov ecx, dword [esp + 0x1c]
and dword [esp + 0x3c], 0
test byte [ebp + 0x18], 1
jne 0x46f79c
or eax, 0xffffffff
cmp ebx, eax
je 0x46f821
cmp edx, eax
je 0x46f821
mov ecx, dword [ebp + 8]
mov edi, ebx
mov ebx, eax
mov dword [esp + 0x18], eax
mov esi, edx
movzx eax, word [ecx + edi*2]
mov dword [esp + 0x28], eax
cmp ax, word [esp + 0x44]
je 0x46f80e
mov eax, dword [esp + 0x2c]
jmp 0x46f37e
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x46f716
cmp esi, dword [esp + 0x30]
jge 0x46f716
mov eax, dword [esp + 0x34]
or ecx, 0xff60
and al, 0xf
shl ecx, 4
movzx eax, al
or cx, ax
mov al, byte [esp + 0x38]
shr al, 4
and al, 3
shl cx, 2
movzx eax, al
or cx, ax
mov word [edx + esi*2], cx
mov eax, dword [esp + 0x38]
inc esi
and al, 0xf
movzx ecx, al
mov eax, 0xff70
or cx, ax
mov eax, dword [esp + 0x40]
and al, 0x3f
shl cx, 6
movzx eax, al
or cx, ax
add edi, 0xb
jmp 0x46f763
mov eax, dword [esp + 0x34]
and al, 0x3f
movzx ecx, al
movzx eax, dl
shl ax, 6
or cx, ax
mov eax, dword [esp + 0x38]
and al, 0x3f
shl cx, 6
movzx eax, al
or cx, ax
add edi, 8
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
movzx ecx, cx
mov dword [esp + 0x18], edx
jmp 0x46f825
mov eax, dword [esp + 0x34]
and cl, 0x1f
mov ebx, dword [esp + 0x24]
and al, 0x3f
movzx ecx, cl
shl cx, 6
movzx eax, al
or cx, ax
add edi, 5
movzx ecx, cx
jmp 0x46f825
mov eax, dword [esp + 0x48]
cmp dword [eax + 0x1c], 0x4b0
je 0x46f806
cmp dword [eax + 0x1c], 0x4b1
je 0x46f806
push ecx
push ecx
lea ecx, [esp + 0x1c]
push ecx
push ecx
mov ecx, dword [eax + 0x1c]
lea edx, [esp + 0x23]
call fcn.0043a831
test eax, eax
je 0x46f821
mov ax, word [esp + 0x14]
test ax, ax
je 0x46f821
movzx ecx, ax
jmp 0x46f809
test byte [ebp + 0x18], 8
jne 0x46f821
cmp byte [esp + 0x12], 0
je 0x46f7fb
cmp cl, 0x3d
je 0x46f7f5
cmp cl, 0x26
je 0x46f7f5
cmp cl, 0x2b
jne 0x46f7fb
test byte [ebp + 0x18], 0x40
jne 0x46f821
cmp cl, 0x23
jne 0x46f806
test byte [ebp + 0x18], 4
jne 0x46f821
movzx ecx, cl
add edi, 2
jmp 0x46f825
and dword [esp + 0x3c], 0
or ebx, 0xffffffff
or edx, ebx
mov byte [esp + 0x12], 1
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x46f836
cmp esi, dword [esp + 0x30]
jge 0x46f836
mov word [eax + esi*2], cx
mov eax, dword [esp + 0x2c]
inc edi
mov ecx, dword [ebp + 8]
inc esi
cmp edi, eax
jl 0x46f36b
mov edx, dword [esp + 0x30]
mov eax, edx
mov edi, dword [esp + 0x48]
sub eax, esi
mov ecx, edi
mov dword [esp + 0x44], eax
call fcn.0046bd12
mov ebx, dword [ebp + 0x10]
test eax, eax
je 0x46f88b
mov ecx, ebx
lea eax, [esp + 0x44]
neg ecx
push eax
sbb ecx, ecx
lea eax, [ebx + esi*2]
and ecx, eax
push ecx
mov ecx, edi
call fcn.00472fa8
test eax, eax
js 0x46f8b7
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x30]
jmp 0x46f88d
xor eax, eax
add esi, eax
test ebx, ebx
je 0x46f89d
cmp esi, edx
jg 0x46f89d
xor ecx, ecx
mov word [ebx + esi*2], cx
mov ecx, dword [ebp + 0x14]
xor eax, eax
mov dword [ecx], esi
test ebx, ebx
jne 0x46f8ab
inc eax
jmp 0x46f8b7
cmp esi, edx
jle 0x46f8b7
mov word [ebx], ax
mov eax, 0x8007007a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14