Function at 0x40c170
Capabilities:
Authenticate hmac
Encode data using xor
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x138
mov eax, dword [0x42f370]
xor eax, esp
mov dword [esp + 0x134], eax
push ebx
mov ebx, edx
xor edx, edx
xor eax, eax
mov dword [esp + 0x81], eax
mov dword [esp + 0x85], eax
mov dword [esp + 0x89], eax
mov dword [esp + 0x8d], eax
mov dword [esp + 0x91], eax
mov dword [esp + 0x95], eax
mov dword [esp + 0x99], eax
mov dword [esp + 0x9d], eax
mov byte [esp + 0xa1], al
mov eax, ecx
push esi
mov dword [esp + 0x10], ecx
mov byte [esp + 0x84], 0
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c1e2
sub eax, esi
mov dword [esp + 0x14], eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c1f6
sub eax, esi
mov esi, eax
xor eax, eax
cmp esi, 0x40
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], eax
mov byte [edi + 0x20], al
jle 0x40c271
push ebx
mov eax, esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], 0x67452301
mov dword [esp + 0x20], 0xefcdab89
mov dword [esp + 0x24], 0x98badcfe
mov dword [esp + 0x28], 0x10325476
call fcn.0040b7b0
add esp, 4
lea esi, [esp + 0x18]
lea ecx, [esp + 0x74]
call fcn.0040b870
lea ebx, [esp + 0x74]
mov esi, 0x10
push 0x41
lea eax, [esp + 0xf4]
push 0
push eax
call fcn.004145e0
push 0x41
lea ecx, [esp + 0xb8]
push 0
push ecx
call fcn.004145e0
add esp, 0x18
test esi, esi
jle 0x40c2c6
lea edx, [esp + 0xf0]
lea ecx, [esp + 0xa8]
sub edx, ebx
sub ecx, ebx
mov eax, ebx
mov dword [esp + 0xc], ecx
mov cl, byte [eax]
mov ebx, dword [esp + 0xc]
mov byte [edx + eax], cl
mov byte [ebx + eax], cl
add eax, 1
sub esi, 1
jne 0x40c2b2
xor ecx, ecx
xor eax, eax
lea ebx, [ebx]
xor byte [esp + eax + 0xf0], 0x36
xor byte [esp + eax + 0xa8], 0x5c
add eax, 1
cmp eax, 0x40
jl 0x40c2d0
lea edx, [esp + 0xf0]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ecx
push edx
mov eax, 0x40
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x67452301
mov dword [esp + 0x20], 0xefcdab89
mov dword [esp + 0x24], 0x98badcfe
mov dword [esp + 0x28], 0x10325476
call fcn.0040b7b0
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
call fcn.0040b7b0
lea esi, [esp + 0x20]
lea ecx, [esp + 0x7c]
call fcn.0040b870
xor ebx, ebx
lea ecx, [esp + 0xb0]
push ecx
lea eax, [ebx + 0x40]
mov ecx, esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], 0x67452301
mov dword [esp + 0x28], 0xefcdab89
mov dword [esp + 0x2c], 0x98badcfe
mov dword [esp + 0x30], 0x10325476
call fcn.0040b7b0
lea edx, [esp + 0x80]
push edx
lea eax, [ebx + 0x10]
mov ecx, esi
call fcn.0040b7b0
add esp, 0x10
lea ecx, [esp + 0x74]
call fcn.0040b870
lea eax, [esp + 0x85]
xor esi, esi
mov dword [esp + 0xc], eax
mov bl, byte [esp + esi + 0x74]
mov edx, dword [esp + 0xc]
movzx ecx, bl
push ecx
add edx, 0xffffffff
push str._02x
push edx
call fcn.00411287
shl bl, 4
movzx eax, bl
mov ebx, dword [esp + 0x18]
push eax
push str._02x
push ebx
call fcn.00411287
add esi, 1
add ebx, 2
add esp, 0x18
cmp esi, 0x10
mov dword [esp + 0xc], ebx
jl 0x40c3ac
push 0x20
lea ecx, [esp + 0x88]
push ecx
push edi
call fcn.00413e60
mov ecx, dword [esp + 0x148]
add esp, 0xc
pop esi
pop ebx
xor ecx, esp
mov eax, edi
call fcn.004110f4
mov esp, ebp
pop ebp
ret