Function at 0x4039d0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571ac8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x5d9ff4]
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, edx
mov dword [ebp - 0x18], edi
mov eax, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x14], eax
call fcn.0041a104
mov ecx, eax
test ecx, ecx
je 0x403cac
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], 0
lea ecx, [esi - 2]
test ecx, ecx
je 0x403ad0
dec ecx
lea esi, [edi + 2]
mov eax, 0xaaaaaaab
mul ecx
mov edi, edx
shr edi, 1
inc edi
lea ebx, [edi + edi*2]
nop
movzx eax, byte [esi - 2]
lea ecx, [ebp - 0x14]
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
push eax
call fcn.00403cc0
movzx ecx, byte [esi - 2]
movzx eax, byte [esi - 1]
and ecx, 3
shl ecx, 4
shr eax, 4
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
lea ecx, [ebp - 0x14]
push eax
call fcn.00403cc0
movzx ecx, byte [esi - 1]
movzx eax, byte [esi]
and ecx, 0xf
shl ecx, 2
shr eax, 6
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
lea ecx, [ebp - 0x14]
push eax
call fcn.00403cc0
movzx eax, byte [esi]
lea ecx, [ebp - 0x14]
and eax, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
push eax
call fcn.00403cc0
lea esi, [esi + 3]
sub edi, 1
jne 0x403a50
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp + 8]
mov edi, 1
cmp ebx, esi
jae 0x403bdc
mov ecx, dword [ebp - 0x18]
movzx eax, byte [ebx + ecx]
lea ecx, [ebp - 0x14]
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
push eax
call fcn.00403cc0
mov edx, dword [ebp - 0x18]
lea eax, [esi - 1]
mov cl, byte [ebx + edx]
cmp ebx, eax
jne 0x403b5e
movzx eax, cl
lea ecx, [ebp - 0x14]
and eax, 3
shl eax, 4
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
push eax
call fcn.00403cc0
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax - 0xc]
lea esi, [ebx + 1]
test esi, esi
js 0x403ca2
mov ecx, dword [eax - 8]
mov edx, edi
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x403b48
push esi
lea ecx, [ebp - 0x14]
call fcn.00404650
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0x3d
cmp esi, dword [eax - 8]
jg 0x403ca2
mov dword [eax - 0xc], esi
mov byte [esi + eax], 0
jmp 0x403ba0
movzx eax, byte [ebx + edx + 1]
movzx ecx, cl
and ecx, 3
shr eax, 4
shl ecx, 4
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
lea ecx, [ebp - 0x14]
push eax
call fcn.00403cc0
mov ecx, dword [ebp - 0x18]
movzx eax, byte [ebx + ecx + 1]
lea ecx, [ebp - 0x14]
and eax, 0xf
movzx eax, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_C]
push eax
call fcn.00403cc0
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax - 0xc]
lea esi, [ebx + 1]
test esi, esi
js 0x403ca2
mov ecx, dword [eax - 8]
mov edx, edi
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x403bc8
push esi
lea ecx, [ebp - 0x14]
call fcn.00404650
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0x3d
cmp esi, dword [eax - 8]
jg 0x403ca2
mov dword [eax - 0xc], esi
mov byte [esi + eax], 0
mov ebx, dword [eax - 0xc]
lea esi, [ebx + 1]
test esi, esi
js 0x403ca2
mov ecx, dword [eax - 8]
sub edi, dword [eax - 4]
sub ecx, esi
or ecx, edi
jge 0x403c02
push esi
lea ecx, [ebp - 0x14]
call fcn.00404650
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0
cmp esi, dword [eax - 8]
jg 0x403ca2
mov dword [eax - 0xc], esi
mov byte [esi + eax], 0
lea esi, [eax - 0x10]
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
mov ecx, eax
jl 0x403c36
cmp ecx, dword [esi]
jne 0x403c36
mov edi, esi
lock inc dword [ebx]
jmp 0x403c61
mov eax, dword [ecx]
push 1
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
je 0x403cb6
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
lea eax, [esi + 0x10]
mov ecx, dword [esi + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [edi + 0x10]
push eax
call fcn.004045d0
add esp, 0x10
lea eax, [edi + 0x10]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x1c]
mov dword [edi], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x403c84
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
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.0054eba5
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004022d0
push 0x80004005
call fcn.004022d0
call fcn.004021d0
int3