Function at 0x409ea0
Capabilities:
Authenticate hmac
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x108
cmp dword [ecx + 0x20], 0
je 0x40a3f0
mov esi, ecx
lea eax, [ecx + 0x10]
push eax
call fcn.004065d0
add esp, 4
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 8], eax
movzx eax, byte [esi]
imul ecx, eax, 0xcd
shr ecx, 0xa
and ecx, 0xfffffffe
lea ecx, [ecx + ecx*4]
sub al, cl
movzx eax, al
movzx eax, byte [eax + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]
mov byte [esp + 6], al
mov byte [esp + 7], 0
mov dword [esp + 0xc], edx
lea eax, [edx + 0x400]
push eax
call fcn.004086b0
add esp, 4
mov dword [esp], eax
mov dword [esp + 0x6c], 0xfffb8ef8
mov byte [esp + 0x70], 0x1c
mov dword [esp + 0x71], 0
mov byte [esp + 0x75], 0
mov eax, 0x7e86c744
mov edi, 0x817938bb
movzx ebx, byte [esp + eax - 0x7e86c6d8]
lea edx, [eax - 0x7e86c700]
and edx, ebx
add edx, edx
lea ebp, [eax + ebx]
mov ecx, edi
sub ecx, ebx
and ecx, edx
not edx
and edx, ebp
sub edx, ecx
add dl, 0xac
mov byte [esp + eax - 0x7e86c6d8], dl
inc eax
dec edi
cmp eax, 0x7e86c74e
jne 0x409f30
lea ebp, [esp + 0x6c]
mov ecx, esi
push 0x449130
push ebp
push dword [esp + 8]
call fcn.004097b0
mov dword [esp + 0x6c], 0x51eae4fc
mov word [esp + 0x70], 0
mov byte [esp + 0x72], 0
xor eax, eax
nop
movzx ecx, byte [esp + eax + 0x6c]
mov edx, eax
not edx
or edx, 0x7711a86d
add edx, eax
mov edi, eax
xor edi, 0xf711a86d
lea edx, [edi + edx*2]
add edx, 2
xor edx, ecx
mov ecx, edx
and ecx, 1
xor edx, 1
lea ecx, [edx + ecx*2]
add cl, 0xde
mov byte [esp + eax + 0x6c], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 7
jb 0x409f90
lea eax, [esp + 6]
mov ecx, esi
push eax
push ebp
push dword [esp + 8]
call fcn.004097b0
mov eax, dword [str.hRjzG3__PPI]
mov dword [esp + 0x6c], 0x913a0400
mov ecx, 0x5a
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [ebp]
lea ebx, [ecx - 0x6c41f000]
or ebx, edi
and edi, ecx
lea edx, [edi + edi]
not edx
add edx, edi
and edx, ebx
mov edi, edx
not edi
mov ebx, edi
and ebx, 0xe2b651c6
xor edx, 0x1d49ae39
add edx, edi
and edi, 0x1d49ae39
sub edx, edi
add edx, ebx
mov ebx, edx
xor ebx, 0xfe
or edx, 1
and ebx, edx
add ebx, edx
mov byte [ebp], bl
inc ebp
dec ecx
cmp ecx, 0x56
jne 0x40a000
lea ebp, [esp + 0x6c]
mov ecx, esi
push eax
push ebp
push dword [esp + 8]
call fcn.004097b0
mov dword [esp + 0x6c], 0x1bec1cef
mov dword [esp + 0x70], 0xf407101f
mov dword [esp + 0x74], 0x20d00f7
mov byte [esp + 0x78], 0x64
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
xor eax, eax
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x6a
xor cl, byte [esp + eax + 0x6c]
add cl, 0xee
mov byte [esp + eax + 0x6c], cl
lea ecx, [eax + eax]
and ecx, 2
mov edx, ecx
and edx, eax
or ecx, eax
xor ecx, 1
add ecx, edx
mov eax, ecx
cmp ecx, 0x12
jb 0x40a090
mov dword [esp + 0x10], 0xb11aeaef
mov byte [esp + 0x14], 0
mov eax, 0x14b77b1d
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax - 0x14b77b0d]
xor ecx, eax
mov edx, ecx
and edx, 0x6c
mov edi, ecx
and edi, 2
mov ebx, edi
xor ebx, 2
imul ebx, edx
or edx, 2
imul edx, edi
xor ecx, 0x6e
add ecx, ebx
add ecx, edx
inc cl
mov byte [esp + eax - 0x14b77b0d], cl
inc eax
cmp eax, 0x14b77b22
jne 0x40a0d0
lea eax, [esp + 0x10]
mov ecx, esi
push ebp
push eax
push dword [esp + 8]
call fcn.004097b0
mov dword [esp + 0x6c], 0x2226241e
mov byte [esp + 0x70], 0xb8
mov word [esp + 0x71], 0
mov byte [esp + 0x73], 0
mov eax, 0xc9d87fdf
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax + 0x3627808d]
xor ecx, eax
mov edx, ecx
and edx, 0xc1187f5c
xor edx, 0x5c
mov edi, ecx
and edi, 0xa2
sub edi, edx
and ecx, 1
or edi, ecx
xor edi, 1
lea ecx, [edi + ecx*2]
mov byte [esp + eax + 0x3627808d], cl
inc eax
cmp eax, 0xc9d87fe7
jne 0x40a140
mov ecx, esi
push dword [esp + 0xc]
push dword [esp + 0xc]
push ebp
push dword [esp + 0xc]
call fcn.00409a30
mov dword [esp + 0x10], 0x3fad39ff
mov dword [esp + 0x14], 0x23b63dae
mov dword [esp + 0x18], 0x27b42185
mov dword [esp + 0x1c], 0x2bc725b0
mov dword [esp + 0x20], 0x2fb7299c
mov dword [esp + 0x24], 0x13b72dbc
mov dword [esp + 0x28], 0x17f611ce
mov dword [esp + 0x2c], 0x1b8f15b9
mov dword [esp + 0x30], 0x1f8a19b4
mov dword [esp + 0x34], 0x3921db5
mov dword [esp + 0x38], 0x79001a1
mov dword [esp + 0x3c], 0xbd90590
mov dword [esp + 0x40], 0xf9d09a2
mov dword [esp + 0x44], 0xf35f0d9a
mov dword [esp + 0x48], 0xf752f11d
mov dword [esp + 0x4c], 0xfb6ef555
mov dword [esp + 0x50], 0xff21f959
mov dword [esp + 0x54], 0xe344fd1c
mov dword [esp + 0x58], 0xe773e173
mov dword [esp + 0x5c], 0xeb4ee576
mov dword [esp + 0x60], 0xef78e949
mov dword [esp + 0x64], 0xd30fed75
mov dword [esp + 0x68], 0xd1d0
mov eax, 0x4a
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax - 0x3a]
mov edx, ecx
and edx, eax
add dl, dl
sub cl, dl
movzx ecx, cl
add ecx, eax
add cl, 0x8e
mov byte [esp + eax - 0x3a], cl
inc eax
cmp eax, 0xa6
jne 0x40a250
movzx eax, word [esp + 0x10]
test ax, ax
je 0x40a2a2
lea ebp, [esp + 0x6c]
lea ecx, [esp + 0x12]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], ax
add ebp, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a290
mov word [ebp], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
mov ecx, 0xffffffff
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp byte [esi + ecx + 0x61], 0
lea ecx, [ecx + 1]
jne 0x40a2c0
cmp eax, ecx
jae 0x40a2dd
movsx ecx, byte [esi + eax + 0x60]
mov word [ebp], cx
inc eax
add ebp, 2
jmp 0x40a2b0
mov dword [ebp], 0xa000d
mov word [ebp + 4], 0
mov eax, dword [esi + 0x80]
mov dword [esp + 0x10], 0x77d7798b
mov dword [esp + 0x14], 0x73cb75c4
mov word [esp + 0x18], 0x7170
mov dword [esp + 0x1a], 0
mov word [esp + 0x1e], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, ecx
and edx, 6
movzx ebx, byte [esp + ecx + 0x10]
mov edi, ecx
and edi, 9
mov ebp, ecx
xor ebp, 0x56ccaa16
sub ebp, edi
add edx, ecx
add edx, ebp
lea edi, [ebx + ebx]
not edi
add edi, ebx
mov ebp, ebx
and ebp, 0xfffffffa
and ebx, 5
xor ebx, 0xaa8e0205
and ebx, edi
or ebx, ebp
mov edi, edx
and edi, 0x28c0205
or edi, 0x170bc12
and edx, 0x5440adfa
xor edx, edi
xor edx, ebx
xor edx, 0xabfebe17
lea ebx, [edx + 0x91]
mov ebp, 0x6e
sub ebp, edx
or ebp, 1
add ebp, edx
mov edi, 0x2e
sub edi, edx
and edi, 0x36
and ebx, 0xc9
or ebx, edi
xor ebx, 0x37
lea edx, [ebx + ebp*2]
add dl, 0x24
mov byte [esp + ecx + 0x10], dl
inc ecx
cmp ecx, 0x10
jne 0x40a320
lea ecx, [esp + 0x6c]
push 0x493e0
push eax
mov edi, dword [esp + 8]
push edi
push 0
push 0
push ecx
lea eax, [esp + 0x28]
push eax
call fcn.0040ca80
add esp, 0x1c
mov ebx, eax
push edi
call fcn.004086c0
add esp, 4
mov eax, dword [esi + 0x80]
add dword [esi + 4], eax
mov dword [esi + 0x80], 0
jmp 0x40a3f2
mov bl, 1
mov eax, ebx
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret