Function at 0x406f1b
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov eax, 0x412640
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x960
push esi
push edi
lea ecx, [ebp - 0x18]
call fcn.00401062
and dword [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00401062
mov ecx, dword [ebp + 8]
mov byte [ebp - 4], 1
call fcn.00401156
add eax, 0x41
push eax
lea ecx, [ebp - 0x18]
call fcn.0040109b
lea ecx, [ebp - 0x18]
call fcn.0040d473
mov ecx, dword [ebp + 8]
push eax
call fcn.0040d473
push eax
call fcn.00410e11
pop ecx
pop ecx
lea ecx, [ebp - 0x18]
call fcn.00401160
mov esi, 0x423d30
push esi
call sub.MSVCRT.dll_strlen
mov edi, eax
pop ecx
lea eax, [edi + 0x41]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040109b
lea ecx, [ebp - 0x18]
call fcn.0040d473
cmp byte [eax], 0x22
jne 0x406fd6
push 0x22
lea ecx, [ebp - 0x18]
call fcn.0040d473
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x406fbc
mov byte [eax], 0
lea ecx, [ebp - 0x18]
call fcn.0040d473
inc eax
push eax
lea ecx, [ebp - 0x18]
call fcn.0040d473
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push ebx
push edi
push esi
lea ecx, [ebp - 0x24]
call fcn.004010e1
push 0x40
pop ebx
jmp 0x406ff1
push 0
lea ecx, [ebp - 0x24]
call fcn.00401136
inc edi
mov eax, edi
cdq
mov ecx, ebx
idiv ecx
test edx, edx
jne 0x406fe6
cmp edi, ebx
jle 0x40704f
lea eax, [ebp - 0x16c]
push eax
call fcn.0041125f
pop ecx
push edi
lea ecx, [ebp - 0x24]
call fcn.0040d473
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.00411c15
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.00411cab
add esp, 0x14
push 0x10
pop edi
push edi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040d473
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push ebx
lea eax, [ebp - 0xd0]
push 0x36
push eax
call sub.MSVCRT.dll_memset
push ebx
lea eax, [ebp - 0x114]
push 0x5c
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
xor esi, esi
test edi, edi
jle 0x40709f
lea ecx, [ebp - 0x24]
call fcn.0040d473
mov al, byte [eax + esi]
xor byte [ebp + esi - 0xd0], al
lea ecx, [ebp - 0x24]
call fcn.0040d473
mov al, byte [eax + esi]
xor byte [ebp + esi - 0x114], al
inc esi
cmp esi, edi
jl 0x407076
lea eax, [ebp - 0x8c]
push eax
call fcn.0041125f
push ebx
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411c15
add esp, 0x10
lea ecx, [ebp - 0x18]
call fcn.00401156
push eax
lea ecx, [ebp - 0x18]
call fcn.0040d473
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411c15
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411cab
lea eax, [ebp - 0x8c]
push eax
call fcn.0041125f
push ebx
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411c15
push 0x10
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411c15
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00411cab
lea eax, [ebp - 0x96c]
push 0x41e070
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x96c]
add esp, 0x40
push eax
call sub.MSVCRT.dll_strlen
mov esi, eax
pop ecx
mov byte [ebp + esi - 0x96c], 0x20
inc esi
xor edi, edi
pop ebx
movzx eax, byte [ebp + edi - 0x34]
push eax
lea eax, [ebp + esi - 0x96c]
push str._02x
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
inc esi
inc esi
inc edi
cmp edi, 0x10
jl 0x407161
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x96c]
push esi
push eax
call fcn.0041103c
push 0x413644
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strcat
add esp, 0x18
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0
call fcn.00401054
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00401054
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret