Function at 0x405520
Capabilities:
Encode data using base64
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425c6b
mov eax, dword fs:[0]
push eax
mov eax, 0x12e8
call fcn.0040e570
mov eax, dword [0x434054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 2
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x12e4], 0
jge 0x405594
mov edx, str.Usage:
mov ecx, 0x435108
call fcn.004083d0
mov edx, dword [esi]
mov ecx, eax
call fcn.004083d0
mov ecx, eax
call fcn.00408640
mov edx, str._filename_to_encrypt_
mov ecx, eax
call fcn.004083d0
jmp 0x405dd9
mov edx, dword [esi + 4]
mov dword [ebp - 0x10a0], 0
mov ecx, edx
mov dword [ebp - 0x1090], 0
mov dword [ebp - 0x108c], 0xf
mov byte [ebp - 0x10a0], 0
mov dword [ebp - 4], 0xffffffff
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4055c8
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x10a0]
call fcn.00407c80
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x1090]
push eax
mov dword [ebp - 0x12e8], eax
call fcn.0040e0d3
mov edx, dword [ebp - 0x12e8]
lea ecx, [ebp - 0x10a0]
add esp, 4
mov dword [ebp - 0x12e4], eax
cmp dword [ebp - 0x108c], 0x10
lea edi, [ebp - 0x170]
mov esi, 0x431950
mov dword [ebp - 0x12e0], 0
cmovae ecx, dword [ebp - 0x10a0]
mov dword [ebp - 0x12dc], ecx
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
test edx, edx
je 0x4056be
mov edi, dword [ebp - 0x12dc]
mov esi, eax
sub edi, eax
mov dword [ebp - 0x12dc], edx
xor edx, edx
lea eax, [edx + 1]
movzx edx, al
lea esi, [esi + 1]
mov cl, byte [ebp + edx - 0x170]
movzx eax, cl
add eax, dword [ebp - 0x12e0]
movzx eax, al
mov dword [ebp - 0x12e0], eax
movzx eax, byte [ebp + eax - 0x170]
mov byte [ebp + edx - 0x170], al
mov eax, dword [ebp - 0x12e0]
mov byte [ebp + eax - 0x170], cl
movzx eax, byte [ebp + edx - 0x170]
movzx ecx, cl
add ecx, eax
movzx eax, cl
movzx eax, byte [ebp + eax - 0x170]
xor al, byte [edi + esi - 1]
sub dword [ebp - 0x12dc], 1
mov byte [esi - 1], al
jne 0x405652
mov edx, dword [ebp - 0x12e8]
lea ecx, [edx + 2]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [edx*4 + 1]
push eax
call fcn.0040e0d3
mov esi, eax
lea eax, [ebp - 0x1220]
push 0x41
push 0
push eax
mov dword [ebp - 0x12f0], esi
call fcn.0040fa30
push str.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
lea eax, [ebp - 0x1220]
push 0x41
push eax
call fcn.004137dd
mov ecx, dword [ebp - 0x12e8]
xor edx, edx
add esp, 0x1c
mov dword [ebp - 0x12e0], edx
xor edi, edi
test ecx, ecx
je 0x405813
nop dword [eax]
xor eax, eax
cmp edi, ecx
jae 0x405737
mov ecx, dword [ebp - 0x12e4]
inc dword [ebp - 0x12e4]
inc edi
mov cl, byte [ecx]
jmp 0x405749
cmp eax, 3
jae 0x405df6
inc edx
xor cl, cl
mov dword [ebp - 0x12e0], edx
mov byte [ebp + eax - 0x12ec], cl
inc eax
mov ecx, dword [ebp - 0x12e8]
cmp eax, 3
jl 0x405722
mov cl, byte [ebp - 0x12ec]
mov dl, byte [ebp - 0x12eb]
mov al, cl
sar al, 2
and cl, 3
and al, 0x3f
shl cl, 4
mov byte [ebp - 0x12dc], al
mov al, dl
sar al, 4
and dl, 0xf
and al, 0xf
shl dl, 2
or al, cl
mov cl, byte [ebp - 0x12ea]
mov byte [ebp - 0x12db], al
mov al, cl
sar al, 6
and cl, 0x3f
and al, 3
mov byte [ebp - 0x12d9], cl
or al, dl
mov ecx, 0
mov edx, dword [ebp - 0x12e0]
mov byte [ebp - 0x12da], al
mov eax, 4
sub eax, edx
mov dword [ebp - 0x12f4], eax
je 0x4057ed
mov edx, eax
nop word [eax + eax]
movsx eax, byte [ebp + ecx - 0x12dc]
inc ecx
mov al, byte [ebp + eax - 0x1220]
mov byte [esi], al
inc esi
cmp ecx, edx
jb 0x4057d0
mov edx, dword [ebp - 0x12e0]
test edx, edx
je 0x405805
push edx
push 0x3d
push esi
call fcn.0040fa30
mov edx, dword [ebp - 0x12e0]
add esp, 0xc
add esi, edx
mov ecx, dword [ebp - 0x12e8]
cmp edi, ecx
jb 0x405720
mov byte [esi], 0
mov dword [ebp - 0x1088], 0
mov esi, dword [ebp - 0x12f0]
mov ecx, esi
mov dword [ebp - 0x1078], 0
mov dword [ebp - 0x1074], 0xf
mov byte [ebp - 0x1088], 0
mov byte [ebp - 4], 1
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405850
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x1088]
call fcn.00407c80
push esi
mov byte [ebp - 4], 3
call fcn.0040e08b
mov edx, dword [ebp - 0x1074]
add esp, 4
mov ecx, dword [ebp - 0x1078]
mov eax, edx
sub eax, ecx
push 0xa
push str..encrypted
cmp eax, 0xa
jb 0x4058b9
cmp edx, 0x10
lea esi, [ebp - 0x1088]
lea eax, [ecx + 0xa]
cmovae esi, dword [ebp - 0x1088]
add esi, ecx
mov dword [ebp - 0x1078], eax
push esi
call fcn.0040f4b0
add esp, 0xc
mov byte [esi + 0xa], 0
jmp 0x4058cc
push dword [ebp - 0x12f0]
lea ecx, [ebp - 0x1088]
push 0xa
call fcn.00408b40
lea eax, [ebp - 0x50]
push eax
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x10a0]
call fcn.004053e0
push 0x40
lea eax, [ebp - 0x1198]
push 0
push eax
call fcn.0040fa30
movups xmm0, xmmword [ebp - 0x50]
lea eax, [ebp - 0x1198]
mov dword [ebp - 0x11dc], 8
push 0xb8
movups xmmword [ebp - 0x11d8], xmm0
mov dword [ebp - 0x1154], eax
lea eax, [ebp - 0x12d8]
movups xmm0, xmmword [ebp - 0x40]
push 0
push eax
movups xmmword [ebp - 0x11c8], xmm0
mov dword [ebp - 0x1158], 0
movups xmm0, xmmword [ebp - 0x30]
movups xmmword [ebp - 0x11b8], xmm0
movups xmm0, xmmword [ebp - 0x20]
movups xmmword [ebp - 0x11a8], xmm0
call fcn.0040fa30
add esp, 0x1c
mov dword [ebp - 0x12d8], 0x431a60
mov dword [ebp - 0x1260], 0
mov dword [ebp - 0x1240], 0
mov dword [ebp - 0x123c], 0
mov dword [ebp - 0x1238], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x12c8]
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x12e4], 1
push eax
lea ecx, [ebp - 0x1268]
mov dword [ebp - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov dword [ebp - 0x126c], 0x58
movlpd qword [ebp - 0x12d0], xmm0
call fcn.00408120
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x12d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x12d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x12dc], eax
lea ecx, [ebp - 0x12c8]
call fcn.00407a80
mov byte [ebp - 4], 7
lea eax, [ebp - 0x10a0]
cmp dword [ebp - 0x108c], 0x10
push ecx
cmovae eax, dword [ebp - 0x10a0]
lea ecx, [ebp - 0x12c8]
push 0x21
push eax
call fcn.00407df0
test eax, eax
lea ecx, [ebp - 0x12d8]
mov eax, dword [ebp - 0x12d8]
mov eax, dword [eax + 4]
je 0x405a47
add ecx, eax
xor edx, edx
mov eax, 4
cmp dword [ecx + 0x38], edx
cmovne eax, edx
jmp 0x405a5b
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push 0
push eax
call fcn.004052a0
push 0xb0
lea eax, [ebp - 0x1150]
push 0
push eax
call fcn.0040fa30
add esp, 0xc
mov dword [ebp - 0x1150], 0x431a58
mov dword [ebp - 0x10e0], 0
mov dword [ebp - 0x10c0], 0
mov dword [ebp - 0x10bc], 0
mov dword [ebp - 0x10b8], 0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x114c]
push 0
push eax
lea ecx, [ebp - 0x10e8]
mov dword [ebp - 0x12e4], 5
mov dword [ebp - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov dword [ebp - 0x10ec], 0x60
call fcn.00408120
mov dword [ebp - 4], 0xa
mov eax, dword [ebp - 0x1150]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1154], eax
lea ecx, [ebp - 0x114c]
call fcn.00407a80
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x1088]
cmp dword [ebp - 0x1074], 0x10
push ecx
cmovae eax, dword [ebp - 0x1088]
lea ecx, [ebp - 0x114c]
push 0x22
push eax
call fcn.00407df0
test eax, eax
lea ecx, [ebp - 0x1150]
mov eax, dword [ebp - 0x1150]
mov eax, dword [eax + 4]
je 0x405b65
add ecx, eax
xor edx, edx
mov eax, 4
cmp dword [ecx + 0x38], edx
cmovne eax, edx
jmp 0x405b79
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push 0
push eax
call fcn.004052a0
cmp dword [ebp - 0x127c], 0
je 0x405c66
cmp dword [ebp - 0x1100], 0
je 0x405c66
mov eax, dword [ebp - 0x12d8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x12cc], 1
jne 0x405c53
nop dword [eax]
nop word [eax + eax]
sub esp, 8
lea eax, [ebp - 0x1070]
lea ecx, [ebp - 0x12d8]
push eax
call fcn.00406e30
mov edi, dword [ebp - 0x12d0]
xor esi, esi
test edi, edi
je 0x405c27
mov edx, dword [ebp - 0x1154]
mov ecx, dword [ebp - 0x1158]
nop dword [eax]
test ecx, ecx
jne 0x405c0b
lea ecx, [ebp - 0x11dc]
call fcn.0040c250
mov edx, dword [ebp - 0x1154]
mov ecx, dword [ebp - 0x1158]
mov al, byte [edx]
dec ecx
xor byte [ebp + esi - 0x1070], al
inc edx
inc esi
mov dword [ebp - 0x1154], edx
mov dword [ebp - 0x1158], ecx
cmp esi, edi
jb 0x405bf0
push 0
push edi
lea eax, [ebp - 0x1070]
push eax
lea ecx, [ebp - 0x1150]
call fcn.00406f90
mov eax, dword [ebp - 0x12d8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x12cc], 1
je 0x405bc0
push 0
push 0x20
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x1150]
call fcn.00406f90
mov eax, dword [ebp - 0x1150]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1154], eax
lea ecx, [ebp - 0x114c]
call fcn.00406a30
mov eax, dword [ebp - 0x1150]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x1154], eax
lea eax, [ebp - 0x10e8]
mov byte [ebp - 4], 0xc
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.0040d991
mov eax, dword [ebp - 0x12d8]
add esp, 4
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x12d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x12dc], eax
lea ecx, [ebp - 0x12c8]
call fcn.00406a30
mov eax, dword [ebp - 0x12d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x12d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x12dc], eax
lea eax, [ebp - 0x1268]
mov byte [ebp - 4], 0xd
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.0040d991
mov edx, dword [ebp - 0x1074]
add esp, 4
cmp edx, 0x10
jb 0x405d88
mov ecx, dword [ebp - 0x1088]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405d7e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405dfb
push edx
push ecx
call fcn.0040e0c5
add esp, 8
mov edx, dword [ebp - 0x108c]
mov dword [ebp - 0x1078], 0
mov dword [ebp - 0x1074], 0xf
mov byte [ebp - 0x1088], 0
cmp edx, 0x10
jb 0x405dd9
mov ecx, dword [ebp - 0x10a0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405dcf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405dfb
push edx
push ecx
call fcn.0040e0c5
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e07d
mov esp, ebp
pop ebp
ret
call fcn.0040e472
call fcn.0041378c
int3