Function at 0x40aec0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x40
mov eax, dword [0x4730bc]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
mov ebx, dword [esp + 0x60]
push edi
call fcn.004117b0
mov edi, eax
test edi, edi
jne 0x40aee6
xor bl, bl
jmp 0x40b0ec
cmp dword [esp + 0x60], 0x10
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], 0
cmovae eax, dword [esp + 0x4c]
push eax
push 0x2712
push edi
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x38], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0xf
call fcn.00414c60
push 1
push 0x51
push edi
call fcn.00414c60
add esp, 0x18
mov dword [esp + 8], 0x3c233b23
mov dword [esp + 0xc], 0x212621
xor ecx, ecx
mov byte [esp + 0x10], 1
lea eax, [ecx + 0x4d]
xor byte [esp + ecx + 8], al
inc ecx
cmp ecx, 7
jb 0x40af54
push esi
lea eax, [esp + 0xc]
mov byte [esp + 0x14], 0
push eax
push 0x2722
push edi
call fcn.00414c60
push str.bratvapubgm.com
push 0x27c1
push edi
call fcn.00414c60
push 1
push 0x40
push edi
call fcn.00414c60
cmp dword [esp + 0xa4], 0x10
lea eax, [esp + 0x90]
cmovae eax, dword [esp + 0x90]
push eax
push 0x271f
push edi
call fcn.00414c60
push 0x40bca0
push 0x4e2b
push edi
call fcn.00414c60
lea eax, [esp + 0x54]
push eax
push 0x2711
push edi
call fcn.00414c60
add esp, 0x48
push 0x409790
push 0x4e6f
push edi
call fcn.00414c60
lea eax, [esp + 0x3c]
push eax
push 0x272d
push edi
call fcn.00414c60
push edi
call fcn.004117f0
push edi
mov esi, eax
call fcn.00411790
add esp, 0x20
test esi, esi
pop esi
je 0x40b015
mov edx, dword [esp + 0x28]
xor bl, bl
jmp 0x40b056
push 0x1024
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x1024
push 0
push eax
mov dword [0x473578], eax
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x24]
add esp, 0x10
cmp edx, 0x10
cmovae ecx, dword [esp + 0x14]
sub ebx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x40b047
mov bl, 1
mov ecx, dword [esp + 0x40]
cmp ecx, 0x10
jb 0x40b090
mov edx, dword [esp + 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b082
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b15b
push ecx
push edx
call fcn.0045aae6
mov edx, dword [esp + 0x30]
add esp, 8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0xf
mov byte [esp + 0x2c], 0
cmp edx, 0x10
jb 0x40b0d7
mov ecx, dword [esp + 0x14]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b0cd
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b15b
push edx
push ecx
call fcn.0045aae6
add esp, 8
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0xf
mov byte [esp + 0x14], 0
mov ecx, dword [esp + 0x60]
cmp ecx, 0x10
jb 0x40b11e
mov edx, dword [esp + 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b114
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b15b
push ecx
push edx
call fcn.0045aae6
add esp, 8
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0xf
mov byte [esp + 0x4c], 0
cmp ecx, 0x10
jb 0x40b16b
mov edx, dword [esp + 0x68]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b161
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40b161
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045aae6
add esp, 8
mov ecx, dword [esp + 0x44]
mov al, bl
pop edi
pop ebx
xor ecx, esp
call fcn.0045aaf4
add esp, 0x40
ret