Function at 0x10037670
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edx
xor ecx, ecx
mov dword [ebp - 0x18], edi
xor esi, esi
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], esi
test edi, edi
je 0x1003789a
mov ebx, edi
lea edx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x10037698
sub ebx, edx
test ebx, ebx
jle 0x1003789a
lea esp, [esp]
push str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
push edi
call dword [sym.imp.MSVCR120.dll_strspn]
mov ecx, dword [ebp - 4]
sub ebx, eax
add ecx, eax
add esp, 8
add edi, eax
mov dword [ebp - 4], ecx
test ebx, ebx
jle 0x10037718
push str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
push edi
call dword [sym.imp.MSVCR120.dll_strcspn]
add esp, 8
mov dword [ebp - 0xc], eax
xor esi, esi
test eax, eax
jle 0x1003770a
jmp 0x100376f0
movsx eax, byte [esi + edi]
push eax
call dword [sym.imp.MSVCR120.dll_isspace]
add esp, 4
test eax, eax
je 0x10037727
mov eax, dword [ebp - 0xc]
inc esi
cmp esi, eax
jl 0x100376f0
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
sub ebx, eax
add edi, eax
test ebx, ebx
jg 0x100376b0
mov ebx, dword [ebp - 0x14]
cmp dword [ebx], 0
jne 0x10037784
test esi, esi
je 0x10037755
dec esi
jmp 0x10037757
cmp byte [esi + edi], 0x3d
jne 0x1003774c
mov ecx, dword [ebp - 4]
mov esi, ecx
and esi, reloc.WS2_32.dll_closesocket
jns 0x1003773f
dec esi
or esi, 0xfffffffc
inc esi
mov dword [ebp - 0x10], esi
cmp esi, 2
jl 0x1003774c
mov eax, dword [ebp - 0xc]
jmp 0x10037710
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
lea ecx, [eax + eax*2]
xor eax, eax
add ecx, esi
setb al
neg eax
or eax, ecx
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov dword [ebx], eax
test eax, eax
je 0x1003788b
mov ecx, dword [ebp - 4]
test ecx, ecx
jle 0x1003788e
mov edx, dword [ebp - 0x18]
xor esi, esi
mov eax, dword [ebx]
mov edi, edx
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x100377a1
sub edi, ecx
xor eax, eax
mov dword [ebp - 0x14], eax
test edi, edi
jle 0x1003788b
mov bl, byte [eax + edx]
movsx eax, bl
push eax
call dword [sym.imp.MSVCR120.dll_isspace]
add esp, 4
test eax, eax
jne 0x10037879
lea eax, [ebx - 0x41]
cmp al, 0x19
ja 0x100377db
sub bl, 0x41
jmp 0x10037803
lea eax, [ebx - 0x61]
cmp al, 0x19
ja 0x100377e7
sub bl, 0x47
jmp 0x10037803
lea eax, [ebx - 0x30]
cmp al, 9
ja 0x100377f3
add bl, 4
jmp 0x10037803
cmp bl, 0x2b
jne 0x100377fc
mov bl, 0x3e
jmp 0x10037803
cmp bl, 0x2f
jne 0x10037874
mov bl, 0x3f
mov eax, esi
inc esi
cmp eax, 3
ja case.default.0x1003780b
jmp dword [eax*4 + 0x100378b4]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
shl bl, 2
mov byte [eax + ecx], bl
jmp 0x10037865
mov ecx, dword [ebp - 8]
mov al, bl
mov edx, dword [ebp - 0xc]
shr al, 4
and al, 3
or byte [edx + ecx], al
shl bl, 4
mov byte [edx + ecx + 1], bl
jmp 0x10037865
mov ecx, dword [ebp - 8]
mov al, bl
mov edx, dword [ebp - 0xc]
shr al, 2
and al, 0xf
or byte [edx + ecx + 1], al
shl bl, 6
mov byte [edx + ecx + 2], bl
jmp 0x10037865
mov ecx, dword [ebp - 8]
and bl, 0x3f
mov eax, dword [ebp - 0xc]
or byte [eax + ecx + 2], bl
jmp 0x10037865
mov ecx, dword [ebp - 8]
cmp esi, 4
jne 0x10037879
xor esi, esi
add ecx, 3
mov dword [ebp - 8], ecx
jmp 0x10037879
cmp bl, 0x3d
je 0x1003788b
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, edi
jl 0x100377b7
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1003789a
lea esi, [eax - 1]
jmp 0x1003789c
xor esi, esi
mov eax, ecx
cdq
and edx, 3
pop edi
lea ecx, [edx + eax]
sar ecx, 2
lea eax, [esi + ecx*2]
pop esi
add eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret