Function at 0x409840
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441075
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1d8
mov eax, dword [0x4af040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1b4], esi
push 0xc0
lea eax, [ebp - 0xf0]
mov dword [ebp - 0x1b4], esi
push 0
push eax
mov dword [ebp - 0x1b8], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xf0], 0x4a8dd8
lea ecx, [ebp - 0x78]
mov dword [ebp - 0xe0], 0x454264
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
lea eax, [ebp - 0xd8]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0x1b8], 2
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char____]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0xf0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf0], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xf0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x78]
mov dword [ebp + ecx - 0xf4], eax
lea ecx, [ebp - 0xd8]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0xd8], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x90], 0
mov byte [ebp - 0x9b], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4af920]
mov ecx, dword [0x4af924]
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0xa0], 0
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 4], 2
call fcn.00409480
mov edx, eax
mov byte [ebp - 4], 3
xor ecx, ecx
mov dword [ebp - 0x1b0], 0xb
mov dword [ebp - 0x1ac], 0xf7f1e7f7
mov dword [ebp - 0x1a8], 0xa6e9e9ec
mov dword [ebp - 0x1a4], 0x8cffebed
nop dword [eax]
mov al, cl
sub al, 0x7f
xor byte [ebp + ecx - 0x1ac], al
inc ecx
mov eax, dword [ebp - 0x1b0]
cmp ecx, eax
jb 0x4099c0
mov byte [ebp + eax - 0x1ac], 0
lea ecx, [ebp - 0x1d0]
lea eax, [ebp - 0x1ac]
push eax
call fcn.0040d1e0
add esp, 4
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0xf
jbe 0x4099ff
mov eax, dword [eax]
push ecx
push 1
push eax
lea ecx, [ebp - 0xd8]
call fcn.0040c9e0
test eax, eax
lea ecx, [ebp - 0xf0]
mov eax, dword [ebp - 0xf0]
push 0
je 0x409a2d
add ecx, dword [eax + 4]
push 0
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
jmp 0x409a38
add ecx, dword [eax + 4]
push 2
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1bc]
cmp ecx, 0xf
jbe 0x409a72
mov edx, dword [ebp - 0x1d0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409a68
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409abd
push ecx
push edx
call fcn.0043ff31
add esp, 8
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x1d4]
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
cmp ecx, 0xf
jbe 0x409acd
mov edx, dword [ebp - 0x1e8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409ac3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x409ac3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043ff31
add esp, 8
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
push 0x45416d
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x2c], xmm0
call fcn.0040d7f0
mov byte [ebp - 4], 5
cmp dword [ebp - 0x8c], 0
je 0x409b7b
mov eax, dword [ebp - 0xf0]
lea ecx, [ebp - 0xf0]
push 0xa
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movzx eax, al
lea edx, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0xf0]
call fcn.0040dfc0
add esp, 4
lea ecx, [ebp - 0xd8]
call fcn.0040c910
test eax, eax
jne 0x409b51
push eax
mov eax, dword [ebp - 0xf0]
lea ecx, [ebp - 0xf0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
movups xmm0, xmmword [ebp - 0x2c]
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [esi + 0x10], xmm0
jmp 0x409f49
lea ecx, [ebp - 0xd8]
call fcn.0040c910
test eax, eax
jne 0x409ba2
push eax
mov eax, dword [ebp - 0xf0]
lea ecx, [ebp - 0xf0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push 0xb0
lea eax, [ebp - 0x1a0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1e8]
call fcn.00409480
mov edx, eax
mov byte [ebp - 4], 6
xor ecx, ecx
mov dword [ebp - 0x1b0], 0xb
mov dword [ebp - 0x1ac], 0xf7f1e7f7
mov dword [ebp - 0x1a8], 0xa6e9e9ec
mov dword [ebp - 0x1a4], 0x8cffebed
mov al, cl
sub al, 0x7f
xor byte [ebp + ecx - 0x1ac], al
inc ecx
mov eax, dword [ebp - 0x1b0]
cmp ecx, eax
jb 0x409bf3
mov byte [ebp + eax - 0x1ac], 0
lea ecx, [ebp - 0x1d0]
lea eax, [ebp - 0x1ac]
push eax
call fcn.0040d1e0
add esp, 4
mov edi, eax
mov byte [ebp - 4], 7
cmp dword [edi + 0x14], 0xf
jbe 0x409c34
mov edi, dword [edi]
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x1a0], 0x454264
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x19c]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x1b8], 6
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 9
mov eax, dword [ebp - 0x1a0]
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 - 0x1a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1a4], eax
lea ecx, [ebp - 0x19c]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x19c]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x154], 0
mov byte [ebp - 0x15f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4af920]
mov ecx, dword [0x4af924]
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x15c], eax
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x164], 0
push ecx
push 2
push edi
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 0xa
call fcn.0040c9e0
test eax, eax
jne 0x409d27
push eax
mov eax, dword [ebp - 0x1a0]
lea ecx, [ebp - 0x1a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0x1a0]
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 - 0x1a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1a4], eax
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x1bc]
cmp ecx, 0xf
jbe 0x409d88
mov edx, dword [ebp - 0x1d0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409d7e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409dd3
push ecx
push edx
call fcn.0043ff31
add esp, 8
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x1d4]
cmp ecx, 0xf
jbe 0x409de3
mov edx, dword [ebp - 0x1e8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409dd9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x409dd9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043ff31
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x1d8], 0
mov eax, 4
mov dword [ebp - 0x1d4], 0xf
mov byte [ebp - 0x1e8], 0
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1a8], 0xb4b3b2b0
mov byte [ebp - 0x1a4], 0x85
mov word [ebp - 0x1a3], cx
mov byte [ebp - 0x1a1], cl
nop dword [eax]
mov al, cl
sub al, 0x7f
xor byte [ebp + ecx - 0x1a8], al
inc ecx
mov eax, dword [ebp - 0x1ac]
cmp ecx, eax
jb 0x409e30
lea edx, [ebp - 0x1a8]
mov byte [ebp + eax - 0x1a8], 0
lea ecx, [ebp - 0x1a0]
call fcn.0040cfc0
lea ecx, [ebp - 0x19c]
call fcn.0040c910
test eax, eax
jne 0x409e86
push eax
mov eax, dword [ebp - 0x1a0]
lea ecx, [ebp - 0x1a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
xor ecx, ecx
mov dword [ebp - 0x1a8], 0xb4b3b2b0
mov eax, 4
mov byte [ebp - 0x1a4], 0x85
mov dword [ebp - 0x1ac], eax
mov word [ebp - 0x1a3], cx
mov byte [ebp - 0x1a1], cl
mov al, cl
sub al, 0x7f
xor byte [ebp + ecx - 0x1a8], al
inc ecx
mov eax, dword [ebp - 0x1ac]
cmp ecx, eax
jb 0x409eb1
mov byte [ebp + eax - 0x1a8], 0
lea ecx, [ebp - 0x1a8]
xorps xmm0, xmm0
lea edx, [ecx + 1]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409ef0
sub ecx, edx
lea eax, [ebp - 0x1a8]
push ecx
push eax
mov ecx, esi
call fcn.0040d7f0
lea ecx, [ebp - 0x1a0]
call fcn.0040a040
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x409f49
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409f3f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x409f3f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043ff31
add esp, 8
lea ecx, [ebp - 0xf0]
call fcn.00409f80
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043fbc2
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret