Function at 0x402040
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xfb5919
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x100c068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x54]
push 0x41
push 0
mov dword [ebp - 0x70], edi
push eax
mov dword [ebp - 0x6c], 0
call fcn.00f8fdb0
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
lea eax, [ecx + 0x41]
mov byte [ebp + ecx - 0x54], al
inc ecx
cmp ecx, 0x1a
jl 0x402090
xor ecx, ecx
nop
lea eax, [ecx + 0x61]
mov byte [ebp + ecx - 0x3a], al
inc ecx
cmp ecx, 0x1a
jl 0x4020a0
xor ecx, ecx
nop
lea eax, [ecx + 0x30]
mov byte [ebp + ecx - 0x20], al
inc ecx
cmp ecx, 0xa
jl 0x4020b0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov word [ebp - 0x16], 0x2f2b
mov byte [edi], 0
mov eax, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x6c], 1
test eax, eax
je 0x4022af
mov ecx, dword [ebp + 0xc]
dec eax
mov dword [ebp + 0x10], eax
mov al, byte [ecx]
inc ecx
mov byte [ebp + esi - 0x58], al
inc esi
mov bl, byte [ebp - 0x56]
mov dl, byte [ebp - 0x58]
mov bh, byte [ebp - 0x57]
mov dword [ebp + 0xc], ecx
mov byte [ebp - 0x62], bl
mov byte [ebp - 0x61], dl
cmp esi, 3
jne 0x4021a2
mov al, dl
mov cl, dl
shr al, 2
and cl, 3
mov byte [ebp - 0x60], al
mov al, bh
shl cl, 4
shr al, 4
add cl, al
mov al, bl
mov byte [ebp - 0x5f], cl
mov cl, bh
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
mov al, bl
and al, 0x3f
mov byte [ebp - 0x5e], cl
mov byte [ebp - 0x5d], al
xor esi, esi
nop
movzx eax, byte [ebp + esi - 0x60]
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
mov bl, byte [ebp + eax - 0x54]
mov byte [ebp - 0x5c], bl
cmp ecx, edx
jae 0x40217f
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0x10
jb 0x402175
mov eax, dword [edi]
mov byte [eax + ecx], bl
mov byte [eax + ecx + 1], 0
jmp 0x402191
push dword [ebp - 0x5c]
mov byte [ebp - 0x68], 0
push dword [ebp - 0x68]
push ecx
mov ecx, edi
call fcn.00406680
inc esi
cmp esi, 4
jl 0x402150
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov dl, byte [ebp - 0x61]
mov bl, byte [ebp - 0x62]
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x4020f2
mov dword [ebp - 0x5c], esi
test esi, esi
je 0x4022af
mov eax, esi
cmp esi, 3
jge 0x4021dc
cmp eax, 3
jae 0x4022cf
mov byte [ebp + eax - 0x58], 0
inc eax
cmp eax, 3
jl 0x4021c2
mov bl, byte [ebp - 0x56]
mov bh, byte [ebp - 0x57]
mov dl, byte [ebp - 0x58]
mov al, dl
and dl, 3
shr al, 2
mov byte [ebp - 0x60], al
mov al, bh
shr al, 4
and bh, 0xf
shl dl, 4
add dl, al
shl bh, 2
mov al, bl
mov byte [ebp - 0x5f], dl
shr al, 6
and bl, 0x3f
add bh, al
mov byte [ebp - 0x5d], bl
lea eax, [esi + 1]
mov byte [ebp - 0x5e], bh
xor ebx, ebx
mov dword [ebp - 0x68], eax
test eax, eax
jle 0x40226c
mov esi, eax
nop dword [eax + eax]
movzx eax, byte [ebp + ebx - 0x60]
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
mov al, byte [ebp + eax - 0x54]
mov byte [ebp - 0x58], al
cmp ecx, edx
jae 0x402252
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0x10
jb 0x402245
mov eax, dword [edi]
mov dl, byte [ebp - 0x58]
mov byte [eax + ecx], dl
mov byte [eax + ecx + 1], 0
jmp 0x402264
push dword [ebp - 0x58]
mov byte [ebp - 0x68], 0
push dword [ebp - 0x68]
push ecx
mov ecx, edi
call fcn.00406680
inc ebx
cmp ebx, esi
jl 0x402220
mov esi, dword [ebp - 0x5c]
cmp esi, 3
jge 0x4022af
mov ebx, 3
sub ebx, esi
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
cmp ecx, edx
jae 0x402299
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0x10
jb 0x402291
mov eax, dword [edi]
mov word [eax + ecx], 0x3d
jmp 0x4022aa
push 0x3d
mov byte [ebp - 0x68], 0
push dword [ebp - 0x68]
push ecx
mov ecx, edi
call fcn.00406680
sub ebx, 1
jne 0x402278
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00f49793
mov esp, ebp
pop ebp
ret 0xc
call fcn.00f498ca
int3