Function at 0x401120
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x24]
mov eax, dword [ebp + 4]
push esi
push edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401131
sub eax, edx
mov ecx, eax
mov eax, 0x55555556
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
lea eax, [ebx + ebx*2]
mov dword [esp + 0x1c], ecx
sub ecx, eax
push 0x400
mov dword [esp + 0x28], ecx
call fcn.00404cf7
mov edi, eax
xor eax, eax
add esp, 4
cmp ebx, eax
mov byte [edi], 0
jle 0x401205
mov dword [esp + 0x14], eax
lea esi, [edi + 2]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x14]
mov al, byte [edx + ecx + 1]
lea ebp, [edx + ecx]
mov dl, byte [ebp]
mov cl, dl
and cl, 3
mov bl, al
shl cl, 4
sar dl, 2
and al, 0xf
sar bl, 4
or bl, cl
mov cl, byte [ebp + 2]
add dword [esp + 0x14], 3
movzx edx, dl
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
sar cl, 6
add al, al
add al, al
and cl, 3
or cl, al
mov al, byte [ebp + 2]
mov ebp, dword [esp + 0x2c]
mov byte [esi - 2], dl
movzx edx, bl
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
movzx ecx, cl
mov byte [esi - 1], dl
movzx edx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
and al, 0x3f
movzx eax, al
mov byte [esi], dl
movzx ecx, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + 1], cl
add esi, 4
sub dword [esp + 0x18], 1
jne 0x401182
mov eax, dword [esp + 0x20]
lea esi, [eax*4]
mov eax, dword [esp + 0x24]
cmp eax, 1
jne 0x40124c
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x1c]
mov al, byte [eax + edx - 1]
mov cl, al
sar al, 2
and cl, 3
movzx edx, al
movzx eax, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
shl cl, 4
mov byte [edi + esi], al
movzx ecx, cl
mov dl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
inc esi
mov byte [edi + esi], dl
inc esi
mov byte [edi + esi], 0x3d
jmp 0x4012a2
cmp eax, 2
jne 0x4012a8
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + eax - 2]
mov cl, byte [eax]
mov al, byte [eax + 1]
mov bl, cl
mov dl, al
sar cl, 2
sar dl, 4
and bl, 3
movzx ecx, cl
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
shl bl, 4
or dl, bl
and al, 0xf
mov byte [edi + esi], cl
add al, al
movzx edx, dl
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
add al, al
inc esi
movzx edx, al
mov byte [edi + esi], cl
movzx eax, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
inc esi
mov byte [edi + esi], al
inc esi
mov byte [edi + esi], 0x3d
inc esi
push 0
push 0
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [edi + esi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
dec ebx
test ebx, ebx
jle 0x40130c
mov eax, dword [ebp]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
sub edx, ebx
or ecx, edx
jge 0x4012e4
mov ecx, ebx
mov eax, ebp
call fcn.00401630
mov eax, dword [ebp]
push ebx
push eax
push 0xffffffffffffffff
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp]
cmp ebx, dword [eax - 8]
jg 0x40132a
mov dword [eax - 0xc], ebx
mov ecx, dword [ebp]
xor edx, edx
mov word [ecx + ebx*2], dx
jmp 0x40136a
mov ecx, dword [ebp]
cmp dword [ecx - 0xc], 0
mov ebx, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x40136a
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x401345
cmp dword [ecx - 8], 0
jge 0x401334
push 0x80070057
call fcn.00401740
mov dword [ecx - 0xc], 0
mov eax, dword [ebp]
xor ecx, ecx
mov word [eax], cx
jmp 0x40136a
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40135b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
add eax, 0x10
mov dword [ebp], eax
push edi
call fcn.00404d02
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4