Function at 0x40e5b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x40
mov eax, dword [0x4790bc]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
mov ebx, dword [esp + 0x60]
push edi
call fcn.00415fa0
mov edi, eax
test edi, edi
jne 0x40e5d6
xor bl, bl
jmp 0x40e7dc
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.00419450
push 1
push 0x51
push edi
call fcn.00419450
add esp, 0x18
mov dword [esp + 8], 0x7b7a607a
mov dword [esp + 0xc], 0x686d68
xor ecx, ecx
mov byte [esp + 0x10], 1
lea eax, [ecx + 0x14]
xor byte [esp + ecx + 8], al
inc ecx
cmp ecx, 7
jb 0x40e644
push esi
lea eax, [esp + 0xc]
mov byte [esp + 0x14], 0
push eax
push 0x2722
push edi
call fcn.00419450
push str.bratvapubgm.com
push 0x27c1
push edi
call fcn.00419450
push 1
push 0x40
push edi
call fcn.00419450
cmp dword [esp + 0xa4], 0x10
lea eax, [esp + 0x90]
cmovae eax, dword [esp + 0x90]
push eax
push 0x271f
push edi
call fcn.00419450
push 0x40f1c0
push 0x4e2b
push edi
call fcn.00419450
lea eax, [esp + 0x54]
push eax
push 0x2711
push edi
call fcn.00419450
add esp, 0x48
push 0x40c860
push 0x4e6f
push edi
call fcn.00419450
lea eax, [esp + 0x3c]
push eax
push 0x272d
push edi
call fcn.00419450
push edi
call fcn.00415fe0
push edi
mov esi, eax
call fcn.00415f80
add esp, 0x20
test esi, esi
pop esi
je 0x40e705
mov edx, dword [esp + 0x28]
xor bl, bl
jmp 0x40e746
push 0x1024
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x1024
push 0
push eax
mov dword [0x479858], 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 0x40e737
mov bl, 1
mov ecx, dword [esp + 0x40]
cmp ecx, 0x10
jb 0x40e780
mov edx, dword [esp + 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e772
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e84b
push ecx
push edx
call fcn.0045f2e0
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 0x40e7c7
mov ecx, dword [esp + 0x14]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e7bd
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e84b
push edx
push ecx
call fcn.0045f2e0
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 0x40e80e
mov edx, dword [esp + 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e804
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e84b
push ecx
push edx
call fcn.0045f2e0
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 0x40e85b
mov edx, dword [esp + 0x68]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e851
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40e851
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045f2e0
add esp, 8
mov ecx, dword [esp + 0x44]
mov al, bl
pop edi
pop ebx
xor ecx, esp
call fcn.0045f2ee
add esp, 0x40
ret