Function at 0x585c40
Capabilities:
Encode data using base64
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x98
mov edi, dword [edx]
mov esi, dword [edx + 4]
mov ebx, dword [edx + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x8c], edx
mov ecx, dword [edi]
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x70
je 0x585c8a
mov ecx, dword [edi]
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x50
jne 0x58661b
cmp dword [edi + 0x54], 0
jne 0x5865f1
mov dword [edi + 0x54], 0xffffffff
mov dword [edi + 0x60], 0
mov edx, esi
mov ecx, dword [edi]
push ebx
call fcn.0057b130
add esp, 4
mov dword [esp + 0x90], eax
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ca10
add esp, 4
test al, al
mov dword [esp], ebx
mov dword [esp + 4], esi
je 0x585ce1
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ad80
add esp, 4
mov ecx, dword [edi]
cmp ebx, ecx
jne 0x585d4d
mov eax, dword [edi + 8]
test ebx, ebx
mov dword [esp + 0x3c], eax
movsd xmm0, qword [edi]
movsd qword [esp + 0x34], xmm0
movsd xmm0, qword [edi]
movsd qword [esp + 0x28], xmm0
mov eax, dword [edi + 8]
mov dword [esp + 0x30], eax
js 0x586614
je 0x585fb7
mov eax, dword [0x6f1130]
test eax, eax
jne 0x585d2b
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x585d3e
mov dword [0x6f1130], eax
mov ebx, dword [esp]
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ebx, eax
test eax, eax
jne 0x585fbc
mov ecx, dword [esp]
mov edx, 1
call fcn.0040a640
ud2
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x7b
mov dword [esp + 0x20], edi
jne 0x585f02
lea eax, [edi + 0x58]
lea ecx, [esp + 0x28]
mov edx, edi
mov dword [esp + 0xc], eax
push ebx
push esi
call fcn.0057c940
add esp, 8
mov eax, dword [esp + 0x3c]
movsd xmm0, qword [esp + 0x34]
mov dword [esp + 0x88], eax
movsd qword [esp + 0x80], xmm0
jmp 0x585dac
mov eax, dword [edi + 0x58]
mov byte [eax + edx], bl
inc dword [edi + 0x60]
mov ebx, dword [esp]
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ca10
add esp, 4
test al, al
je 0x585f7d
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ad80
add esp, 4
mov ecx, dword [edi]
cmp ebx, ecx
je 0x585f7d
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x7d
je 0x585f7d
mov ecx, dword [edi]
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
mov ebx, eax
cmp eax, 0x7f
ja 0x585e20
mov edx, dword [edi + 0x60]
cmp edx, dword [edi + 0x5c]
jne 0x585da0
mov ecx, dword [esp + 0xc]
call fcn.005bab80
mov edx, dword [edi + 0x60]
jmp 0x585da0
mov eax, ebx
cmp ebx, 0x800
mov dword [esp + 0x28], 0
jae 0x585e50
shr eax, 6
and bl, 0x3f
mov esi, 2
or al, 0xc0
or bl, 0x80
mov byte [esp + 0x28], al
mov byte [esp + 0x29], bl
jmp 0x585eb1
cmp ebx, 0x10000
jae 0x585e7f
shr eax, 0xc
mov esi, 3
or al, 0xe0
mov byte [esp + 0x28], al
mov eax, ebx
and bl, 0x3f
shr eax, 6
or bl, 0x80
and al, 0x3f
or al, 0x80
mov byte [esp + 0x29], al
mov byte [esp + 0x2a], bl
jmp 0x585eb1
shr eax, 0x12
mov esi, 4
or al, 0xf0
mov byte [esp + 0x28], al
mov eax, ebx
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [esp + 0x29], al
mov eax, ebx
and bl, 0x3f
shr eax, 6
or bl, 0x80
and al, 0x3f
or al, 0x80
mov byte [esp + 0x2a], al
mov byte [esp + 0x2b], bl
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x5c]
mov ebx, dword [ecx + 0x60]
sub eax, ebx
cmp eax, esi
jb 0x585eea
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x58]
add eax, ebx
push esi
lea ecx, [esp + 0x2c]
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, ebx
mov ebx, dword [esp]
mov dword [edi + 0x60], esi
mov esi, dword [esp + 4]
jmp 0x585dac
mov ecx, dword [esp + 0xc]
mov edx, ebx
push esi
call fcn.005f2340
add esp, 4
mov eax, dword [esp + 0x20]
mov ebx, dword [eax + 0x60]
jmp 0x585ec1
mov eax, dword [edi + 8]
mov edx, esi
mov dword [esp + 0x18], eax
movsd xmm0, qword [edi]
movsd qword [esp + 0x10], xmm0
mov ecx, dword [edi]
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x5c
jne 0x586034
lea ecx, [esp + 0x28]
mov edx, edi
push ebx
push esi
call fcn.0057c940
add esp, 8
test ebx, ebx
js 0x586614
je 0x58614c
mov eax, dword [0x6f1130]
test eax, eax
jne 0x585f65
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x585d3e
mov dword [0x6f1130], eax
mov ebx, dword [esp]
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ebx, eax
test eax, eax
jne 0x586151
jmp 0x585d3e
mov ecx, dword [edi]
cmp ebx, ecx
jne 0x586071
mov eax, dword [edi + 8]
test ebx, ebx
mov dword [esp + 0x3c], eax
movsd xmm0, qword [edi]
movsd qword [esp + 0x34], xmm0
movsd xmm0, qword [edi]
movsd qword [esp + 0x28], xmm0
mov eax, dword [edi + 8]
mov dword [esp + 0x30], eax
js 0x586614
jne 0x585d11
mov ebx, 1
mov esi, dword [esp]
push esi
push dword [esp + 8]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x24]
movsd xmm0, qword [esp + 0x28]
movsd xmm1, qword [esp + 0x30]
movsd qword [eax + 0x2c], xmm0
movsd qword [eax + 0x34], xmm1
movsd xmm1, qword [esp + 0x38]
movsd qword [eax + 0x3c], xmm1
mov dword [eax + 4], 0xa
movsd xmm0, qword [esp + 0x28]
movsd xmm1, qword [esp + 0x30]
movsd qword [eax + 8], xmm0
movsd qword [eax + 0x10], xmm1
movsd xmm1, qword [esp + 0x38]
movsd qword [eax + 0x18], xmm1
mov dword [eax + 0x20], ebx
mov dword [eax + 0x24], esi
mov dword [eax + 0x28], esi
mov dword [eax], 1
inc dword [edi + 0x54]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 4], eax
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ca10
add esp, 4
test al, al
je 0x586056
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ad80
add esp, 4
mov eax, dword [esp + 0x18]
movsd xmm0, qword [esp + 0x10]
mov dword [esp + 0x78], eax
xor eax, eax
movsd qword [esp + 0x70], xmm0
jmp 0x586539
mov edx, esi
push ebx
call fcn.0057b130
add esp, 4
cmp eax, 0x7d
mov dword [esp + 0x10], eax
jne 0x586634
mov ecx, edi
mov edx, esi
push ebx
call fcn.0057ca10
add esp, 4
mov esi, dword [edi + 0x58]
mov edi, dword [edi + 0x60]
lea ecx, [esp + 0x28]
mov edx, esi
push 2
push 0x68ae40
push edi
call fcn.0045fa60
add esp, 0xc
cmp dword [esp + 0x28], 1
mov dword [esp], edi
mov dword [esp + 8], esi
jne 0x5860ea
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x4c], 0xffffffff
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
lea edx, [esp + 0x30]
lea ecx, [esp + 0x10]
je 0x586233
push 0
jmp 0x586235
cmp byte [esp + 0x36], 0
je 0x586282
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 8]
cmp dword [esp + 0x10], 1
je 0x586253
mov edx, edi
mov ecx, ebx
push 0x3a
call fcn.00586a60
add esp, 4
cmp eax, 1
jne 0x586193
mov esi, edx
mov eax, edx
test edx, edx
je 0x5864ae
cmp esi, edi
jae 0x5864a6
cmp byte [ebx + eax], 0xbf
jg 0x5864ae
mov ecx, ebx
mov edx, edi
push 0x68ae64
push eax
jmp 0x58627b
mov ebx, 1
mov esi, dword [esp]
push esi
push dword [esp + 8]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
movsd xmm1, qword [esp + 0x30]
mov eax, dword [esp + 0x24]
movsd xmm0, qword [esp + 0x28]
movsd qword [eax + 0x34], xmm1
movsd xmm1, qword [esp + 0x38]
movsd qword [eax + 0x2c], xmm0
movsd qword [eax + 0x3c], xmm1
mov dword [eax + 4], 0x1c
jmp 0x585ff9
mov edx, edi
mov ecx, ebx
push 0x3d
call fcn.00586a60
add esp, 4
cmp eax, 1
movsd xmm0, qword [esp + 0x80]
mov eax, dword [esp + 0x88]
movsd qword [esp + 0x70], xmm0
mov dword [esp + 0x78], eax
jne 0x58647f
mov esi, edx
mov ecx, ebx
mov edx, edi
push esi
call fcn.00586b60
add esp, 4
mov ecx, edx
mov dword [esp], eax
mov ebx, edx
call fcn.00415a30
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], ebx
push ebx
push dword [esp + 4]
mov dword [esp + 0xc], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 8]
inc esi
mov edx, edi
push esi
call fcn.00586ba0
add esp, 4
mov ecx, edx
mov esi, eax
mov ebx, edx
call fcn.00415a30
mov dword [esp + 8], edx
mov dword [esp], ebx
push ebx
push esi
mov dword [esp + 0x74], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov al, 2
xor ecx, ecx
jmp 0x586530
push 1
push ebx
push edi
push esi
push eax
call fcn.00586840
add esp, 0x14
mov edi, dword [esp]
mov ebx, dword [esp + 8]
cmp dword [esp + 0x10], 1
jne 0x58610c
mov esi, dword [esp + 0x14]
test esi, esi
je 0x586382
cmp esi, edi
jae 0x586389
cmp byte [ebx + esi], 0xbf
jg 0x586391
mov ecx, ebx
mov edx, edi
push 0x68ae84
push esi
push 0
jmp 0x586660
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov bl, byte [esp + 0x34]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], ecx
jmp 0x5862ad
mov ebx, dword [esp + 0x34]
mov edi, dword [esp]
add eax, esi
test ebx, 0xff0000
jne 0x5860f5
mov dword [esp + 4], ebx
xor bl, 1
test eax, eax
mov byte [esp + 0x34], bl
je 0x5862d1
cmp edx, eax
jbe 0x5862cb
cmp byte [ecx + eax], 0xbf
jg 0x5862d1
jmp 0x586659
jne 0x586659
cmp eax, edx
je 0x5865c6
movzx ebx, byte [ecx + eax]
test bl, bl
jns 0x586336
movzx esi, byte [ecx + eax + 1]
mov edi, ebx
and edi, 0x1f
and esi, 0x3f
cmp bl, 0xdf
jbe 0x586322
movzx ecx, byte [ecx + eax + 2]
shl esi, 6
and ecx, 0x3f
or ecx, esi
cmp bl, 0xf0
jb 0x58632b
mov esi, dword [esp + 0xc]
and edi, 7
shl ecx, 6
shl edi, 0x12
movzx ebx, byte [esi + eax + 3]
and ebx, 0x3f
or ebx, ecx
mov ecx, esi
or ebx, edi
jmp 0x586336
shl edi, 6
or edi, esi
mov ebx, edi
jmp 0x586336
shl edi, 0xc
or ecx, edi
mov ebx, ecx
mov ecx, dword [esp + 0xc]
cmp byte [esp + 4], 0
jne 0x5865da
cmp ebx, 0x110000
je 0x5865cd
mov esi, 1
cmp ebx, 0x80
jb 0x586298
mov esi, 2
cmp ebx, 0x800
jb 0x586298
cmp ebx, 0x10000
mov esi, 4
sbb esi, 0
jmp 0x586298
mov eax, 1
jmp 0x5863c5
cmp edi, esi
jne 0x586271
test esi, esi
js 0x586614
mov eax, dword [0x6f1130]
test eax, eax
jne 0x5863b4
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x58666a
mov dword [0x6f1130], eax
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x58666a
push esi
push ebx
mov dword [esp + 0xc], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esp + 0xc], esi
add esi, 2
cmp edi, esi
jbe 0x5863f3
cmp byte [ebx + esi], 0xbf
jg 0x5863f5
mov ecx, ebx
mov edx, edi
push 0x68ae94
jmp 0x5864e8
jne 0x5863e5
sub edi, esi
js 0x586614
test edi, edi
je 0x586433
mov eax, dword [0x6f1130]
test eax, eax
jne 0x586418
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x586425
mov dword [0x6f1130], eax
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
jne 0x586438
mov ecx, edi
mov edx, 1
call fcn.0040a640
ud2
mov eax, 1
mov ecx, dword [esp + 8]
add ecx, esi
push edi
push ecx
mov dword [esp + 0x74], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
movsd xmm0, qword [esp + 0x80]
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0xc]
mov dword [esp], edi
mov dword [esp + 8], edi
mov dword [esp + 0x78], eax
mov dword [esp + 0x1c], ecx
movsd qword [esp + 0x70], xmm0
mov al, 2
mov cl, 2
jmp 0x586530
mov ecx, edi
call fcn.00415a30
mov dword [esp + 0xc], edx
push edi
push ebx
mov dword [esp + 0xc], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov al, 1
xor ecx, ecx
mov dword [esp + 0x1c], edi
jmp 0x586530
cmp edi, esi
jne 0x58613d
mov ecx, eax
mov ebx, eax
call fcn.00415a30
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], ebx
push ebx
mov ebx, dword [esp + 0xc]
push ebx
mov dword [esp + 0xc], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
inc esi
je 0x5864f1
cmp edi, esi
jbe 0x5864ef
cmp byte [ebx + esi], 0xbf
jg 0x5864f1
mov ecx, ebx
mov edx, edi
push 0x68ae74
push edi
push esi
jmp 0x586660
jne 0x5864df
sub edi, esi
add ebx, esi
mov ecx, edi
call fcn.00415a30
mov dword [esp + 8], edx
mov dword [esp], edi
push edi
push ebx
mov dword [esp + 0x74], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
movsd xmm0, qword [esp + 0x80]
mov eax, dword [esp + 0x88]
mov cl, 1
mov dword [esp + 0x78], eax
movsd qword [esp + 0x70], xmm0
mov al, 2
mov edx, dword [esp + 0x8c]
mov edi, dword [edx]
mov esi, dword [esp + 0x78]
movsd xmm0, qword [esp + 0x70]
cmp dword [esp + 0x90], 0x50
mov dword [esp + 0x18], esi
movsd qword [esp + 0x10], xmm0
mov ebx, dword [edi + 8]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x24]
movsd xmm1, qword [edi]
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov dword [ebx + 0xc], esi
movsd qword [ebx + 4], xmm0
movsd qword [esp + 0x28], xmm1
mov dword [ebx + 0x18], edx
mov edx, dword [esp + 0x6c]
movsd xmm0, qword [esp + 0x28]
movsd qword [ebx + 0x10], xmm0
mov dword [ebx + 0x2c], edx
mov edx, dword [esp + 8]
mov dword [ebx + 0x30], edx
mov edx, dword [esp]
mov dword [ebx + 0x34], edx
mov byte [ebx + 0x1c], al
mov byte [ebx + 0x1d], cl
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0x1c]
mov dword [ebx + 0x20], ecx
mov ecx, dword [esp + 0xc]
mov dword [ebx + 0x28], edx
mov dword [ebx + 0x24], ecx
sete byte [ebx + 0x38]
mov dword [ebx], 0
jmp 0x586029
cmp byte [esp + 4], 0
jne 0x5865dc
mov edi, dword [esp]
mov byte [esp + 0x36], 1
jmp 0x5860f5
mov edx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 1
jmp 0x586241
lea eax, [esp + 0x28]
mov ecx, str.already_borrowed_
mov edx, 0x10
push 0x68ae20
push 0x68a708
push eax
call fcn.0045d480
add esp, 0xc
ud2
call fcn.0040a620
ud2
mov ecx, 0x68add2
mov edx, 0x3e
push 0x68ae10
call fcn.0045aec0
add esp, 4
ud2
mov dword [esp + 0x28], 0
lea ecx, [esp + 0x10]
mov edx, 0x68acb4
push 0x68ae30
lea eax, [esp + 0x2c]
push eax
call fcn.00594420
add esp, 8
ud2
push 0x6dd4e8
push edx
push eax
call fcn.0045d720
add esp, 0xc
ud2
mov ecx, esi
mov edx, 1
call fcn.0040a640
ud2