Function at 0x408220
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4217e9
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x42e008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x29]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 0
call fcn.00402660
push eax
mov ecx, ebx
call fcn.00401f40
push 0
push 0
mov ecx, ebx
call fcn.004026b0
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 1
test eax, eax
je 0x4084d2
dec eax
mov dword [ebp + 8], eax
mov ax, word [esi]
add esi, 2
mov word [ebp + edi*2 - 0x20], ax
inc edi
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], esi
cmp edi, 3
jne 0x408378
mov ecx, dword [ebp - 0x1e]
mov eax, edx
shr eax, 2
and eax, 0x3f
shr ecx, 4
mov word [ebp - 0x28], ax
and ecx, 0xf
mov eax, edx
and eax, 3
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1e]
mov word [ebp - 0x26], cx
and eax, 0xf
mov ecx, dword [ebp - 0x1c]
shr ecx, 6
and ecx, 3
lea eax, [ecx + eax*4]
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 0x1c]
and eax, 0x3f
xor esi, esi
mov word [ebp - 0x22], ax
lea ecx, [ecx]
mov ecx, 0x4975f0
call fcn.004020f0
movzx ecx, word [ebp + esi*2 - 0x28]
movzx edi, word [eax + ecx*2]
lea eax, [eax + ecx*2]
mov ecx, dword [ebx + 0x10]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 1
jbe 0x4084e6
lea eax, [ecx + 1]
mov ecx, ebx
push 0
push eax
mov dword [ebp - 0x18], eax
call fcn.00402750
test al, al
je 0x408364
mov eax, edi
mov ecx, ebx
mov edi, dword [ebx + 0x10]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.004020f0
lea eax, [eax + edi*2]
push eax
call fcn.00402850
add esp, 8
mov ecx, ebx
push dword [ebp - 0x18]
call fcn.00402870
inc esi
cmp esi, 4
jl 0x408300
mov esi, dword [ebp - 0x10]
xor edi, edi
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edi
mov eax, dword [ebp + 8]
test eax, eax
jne 0x408293
test edi, edi
je 0x4084d2
cmp edi, 3
jge 0x4083b4
mov ecx, 3
lea edx, [ebp - 0x20]
sub ecx, edi
mov eax, 0x2f002f
lea edi, [edx + edi*2]
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x1e]
mov eax, edx
shr eax, 2
and edx, 3
and eax, 0x3f
shl edx, 4
mov word [ebp - 0x28], ax
mov eax, esi
shr eax, 4
and esi, 0xf
and eax, 0xf
add eax, edx
mov word [ebp - 0x26], ax
mov eax, ecx
shr eax, 6
and ecx, 0x3f
and eax, 3
mov word [ebp - 0x22], cx
lea eax, [eax + esi*4]
xor esi, esi
mov word [ebp - 0x24], ax
lea eax, [edi + 1]
mov dword [ebp - 0x14], esi
test eax, eax
jle 0x408478
lea esp, [esp]
mov ecx, 0x4975f0
call fcn.004020f0
movzx ecx, word [ebp + esi*2 - 0x28]
lea eax, [eax + ecx*2]
mov ecx, dword [ebx + 0x10]
movzx eax, word [eax]
mov dword [ebp - 0x10], eax
or eax, 0xffffffff
sub eax, ecx
cmp eax, 1
jbe 0x4084e6
lea eax, [ecx + 1]
mov ecx, ebx
push 0
push eax
mov dword [ebp - 0x18], eax
call fcn.00402750
test al, al
je 0x40846d
mov eax, dword [ebp - 0x10]
mov ecx, ebx
mov esi, dword [ebx + 0x10]
movzx eax, ax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
call fcn.004020f0
lea eax, [eax + esi*2]
push eax
call fcn.00402850
add esp, 8
mov ecx, ebx
push dword [ebp - 0x18]
call fcn.00402870
mov esi, dword [ebp - 0x14]
inc esi
lea eax, [edi + 1]
mov dword [ebp - 0x14], esi
cmp esi, eax
jl 0x408400
cmp edi, 3
jge 0x4084d2
lea ecx, [ecx]
mov ecx, dword [ebx + 0x10]
or eax, 0xffffffff
sub eax, ecx
inc edi
cmp eax, 1
jbe 0x4084e6
lea eax, [ecx + 1]
mov ecx, ebx
push 0
push eax
mov dword [ebp - 0x18], eax
call fcn.00402750
test al, al
je 0x4084cd
mov esi, dword [ebx + 0x10]
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
mov dword [ebp - 0x10], 0x3d
call fcn.004020f0
lea eax, [eax + esi*2]
push eax
call fcn.00402850
add esp, 8
mov ecx, ebx
push dword [ebp - 0x18]
call fcn.00402870
cmp edi, 3
jl 0x408480
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.004021e0
int3