Function at 0x404970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42d807
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x43701c]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push esi
push edi
mov eax, dword [0x43701c]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
lea eax, [esp + 0x50]
push eax
call fcn.004047c0
xor ebx, ebx
mov dword [esp + 0xe8], ebx
cmp dword [esp + 0x68], 8
mov eax, dword [esp + 0x54]
jae 0x4049d2
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [esp + 0xe8], 1
xor eax, eax
push str.NtQuerySystemInformation
push str.ntdll
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x404a2e
push ebx
push 0x20
lea ecx, [esp + 0x1c]
push ecx
push 3
call eax
push ebx
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_wchar_t____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator___unsigned_int_]
push ebx
lea ecx, [esp + 0x38]
mov edi, eax
call dword [sym.imp.MSVCP80.dll_public:_wchar_t____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator___unsigned_int_]
cmp eax, ebx
je 0x404a6d
cmp word [eax], bx
je 0x404a6d
nop
movzx ecx, word [eax]
cmp cx, 0x41
jb 0x404a65
cmp cx, 0x5a
ja 0x404a65
add ecx, 0x20
mov word [eax], cx
add eax, 2
cmp word [eax], bx
jne 0x404a50
mov esi, dword [esp + 0x48]
xor eax, eax
cmp esi, ebx
mov dword [esp + 0x7c], esi
jbe 0x404a95
jmp 0x404a80
mov edx, eax
and edx, 3
mov cx, word [esp + edx*2 + 0x14]
xor word [edi + eax*2], cx
add eax, 1
cmp eax, esi
jb 0x404a80
xor eax, eax
mov dword [esp + 0x6e], eax
mov dword [esp + 0x72], eax
mov dword [esp + 0x76], eax
mov word [esp + 0x7a], ax
lea eax, [esi + esi]
cmp eax, 0x10
mov word [esp + 0x6c], bx
jae 0x404ac6
push eax
lea edx, [esp + 0x70]
push edi
push edx
call sub.MSVCR80.dll_memcpy
add esp, 0xc
jmp 0x404b15
mov esi, eax
shr esi, 3
jmp 0x404ad0
cmp ebx, 7
jne 0x404af4
mov eax, dword [esp + 0x7c]
lea ecx, [esi*8]
sub ecx, esi
add eax, eax
sub eax, ecx
add ecx, edi
call fcn.00404910
mov word [esp + 0x7a], ax
jmp 0x404b07
mov ecx, ebx
imul ecx, esi
add ecx, edi
mov eax, esi
call fcn.00404910
mov word [esp + ebx*2 + 0x6c], ax
add ebx, 1
cmp ebx, 8
jb 0x404ad0
mov esi, dword [esp + 0x7c]
xor ebx, ebx
push 0x48
lea eax, [esp + 0x8a]
push ebx
push eax
mov word [esp + 0x90], bx
call fcn.00426e3a
lea ecx, [esp + 0x90]
add esp, 0xc
test ecx, ecx
je 0x404ba6
movzx edx, byte [esp + 0x7b]
movzx eax, byte [esp + 0x7a]
movzx ecx, byte [esp + 0x79]
push edx
movzx edx, byte [esp + 0x7c]
push eax
movzx eax, byte [esp + 0x7f]
push ecx
movzx ecx, byte [esp + 0x82]
push edx
movzx edx, byte [esp + 0x85]
push eax
movzx eax, byte [esp + 0x88]
push ecx
movzx ecx, word [esp + 0x8a]
push edx
movzx edx, word [esp + 0x8c]
push eax
mov eax, dword [esp + 0x8c]
push ecx
push edx
push eax
push str._08x__04x__04x__02x_02x__02x_02x_02x_02x_02x_02x
lea ecx, [esp + 0xb4]
push 0x25
push ecx
call dword [sym.imp.MSVCR80.dll__snwprintf]
add esp, 0x38
lea edx, [esp + 0x84]
push edx
mov ecx, 0x437728
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp esi, 3
jb 0x404c10
xor eax, eax
mov dword [esp + 0x7e], eax
mov word [esp + 0x82], ax
movzx eax, word [edi]
cdq
mov ecx, 0x1a
idiv ecx
movzx eax, word [edi + 2]
add edx, 0x61
mov word [esp + 0x7c], dx
cdq
idiv ecx
movzx eax, word [edi + 4]
add edx, 0x61
mov word [esp + 0x7e], dx
cdq
idiv ecx
mov ecx, 0x437728
add edx, 0x61
mov word [esp + 0x80], dx
lea edx, [esp + 0x7c]
push edx
call dword [0x42f0fc]
lea ecx, [esp + 0x34]
mov byte [esp + 0xe8], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x50]
mov dword [esp + 0xe8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, 1
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.00426a3b
mov esp, ebp
pop ebp
ret