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

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x4cd00c]
xor eax, esp
mov dword [esp + 0x1d0], eax
mov eax, dword [esp + 0x1e0]
mov edx, dword [esp + 0x1f0]
push ebx
mov ebx, dword [esp + 0x1e0]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1ec]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1f8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x1fc]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
push ebp
mov ebp, dword [esp + 0x1e0]
push esi
push edi
mov edi, dword [esp + 0x1fc]
mov dword [esp + 0x1c], edi
cmp ebx, 0x40
jbe 0x4765c1
lea eax, [esp + 0xf8]
push eax
call fcn.00483330
push ebx
lea eax, [esp + 0x100]
push ebp
push eax
call fcn.00483380
lea eax, [esp + 0x1b0]
push eax
lea eax, [esp + 0x10c]
push eax
call fcn.00483220
mov edx, dword [esp + 0x28]
lea ebp, [esp + 0x1b8]
add esp, 0x18
mov ebx, 0x20
mov eax, 0x40
test edi, edi
je 0x4765e2
cmp byte [edx], 0
je 0x4765e2
mov esi, edi
mov ecx, 0x1a
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x1c]
jmp 0x476652
xor edx, edx
test ebx, ebx
je 0x47660d
mov esi, ebp
lea eax, [esp + 0x160]
sub esi, eax
lea ecx, [esp + 0x160]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, 0x36
mov byte [ecx], al
cmp edx, ebx
jb 0x4765f3
mov eax, 0x40
cmp ebx, 0x40
jae 0x476629
sub eax, ebx
lea ecx, [esp + 0x160]
push eax
add ecx, ebx
push 0x36
push ecx
call fcn.00445940
add esp, 0xc
lea eax, [esp + 0x28]
push eax
call fcn.00483330
push 0x40
lea eax, [esp + 0x168]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00483380
add esp, 0x10
test edi, edi
je 0x476665
mov edx, dword [esp + 0x10]
cmp byte [edx], 0
jne 0x476665
mov ecx, 0x1a
lea esi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
mov byte [edx], 1
push dword [esp + 0x1f4]
lea eax, [esp + 0x2c]
push dword [esp + 0x24]
push eax
call fcn.00483380
lea eax, [esp + 0x1cc]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00483220
mov edi, dword [esp + 0x28]
add esp, 0x14
test edi, edi
je 0x4766b6
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
je 0x4766b6
mov esi, edi
mov ecx, 0x1a
lea edi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
jmp 0x47672a
xor edx, edx
test ebx, ebx
je 0x4766da
lea eax, [esp + 0x160]
sub ebp, eax
lea ecx, [esp + 0x160]
add ecx, edx
inc edx
mov al, byte [ecx + ebp]
xor al, 0x5c
mov byte [ecx], al
cmp edx, ebx
jb 0x4766c5
cmp ebx, 0x40
jae 0x4766fb
mov ecx, 0x40
lea eax, [esp + 0x160]
sub ecx, ebx
add eax, ebx
push ecx
push 0x5c
push eax
call fcn.00445940
add esp, 0xc
lea eax, [esp + 0x90]
push eax
call fcn.00483330
push 0x40
lea eax, [esp + 0x168]
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.00483380
add esp, 0x10
test edi, edi
je 0x476740
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
jne 0x476740
mov ecx, 0x1a
lea esi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push 0x20
lea eax, [esp + 0x1c4]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00483380
push dword [esp + 0x30]
lea eax, [esp + 0xa0]
push eax
call fcn.00483220
mov ecx, dword [esp + 0x1f4]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00443db6
add esp, 0x1d4
ret