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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov dword [esp - 0x28], 0x1306d5b4
push edi
mov edi, dword [ebp + 8]
nop
mov dword [esp - 0xc], ecx
sub esp, 4
mov dword [esp], 0x10f6d95c
xor dword [esp], 0xa8b4993
mov ebx, ebx
add dword [esp], 0x4e4a42a8
sub dword [esp], 0x45280a39
add dword [esp], 0x2bde79ed
mov ebx, ebx
sub dword [esp], 0x4f7e4325
mov word [ebp - 4], 0x7b07
sub word [ebp - 4], 0x369c
mov esp, esp
xor word [ebp - 4], 0x2661
sub word [ebp - 4], 0x4935
add word [ebp - 4], 0x8a9
xchg ebp, ebp
add word [ebp - 4], 0x3dd2
sub word [ebp - 4], 0x4434
mov byte [ebp - 2], 0x36
xor byte [ebp - 2], 0x4d
mov edx, edx
sub byte [ebp - 2], 0x13
sub byte [ebp - 2], 8
xor byte [ebp - 2], 0x62
mov esi, esi
add byte [ebp - 2], 0x15
xor byte [ebp - 2], 0x56
mov dword [edi + 4], 0x7503d221
sub dword [edi + 4], 0x593ed54d
mov dword [esp - 0x28], esi
xor dword [edi + 4], 0x3711e974
sub dword [edi + 4], 0x293fa4a2
add dword [edi + 4], 0x69e2d87a
xor dword [edi + 4], 0x27d37bcd
xchg esi, esi
xor dword [edi + 4], 0x4aab32b6
call fcn.0048b720
xor ecx, ecx
add esp, 4
mov dword [esp - 0x14], edi
mov edx, eax
mov dword [edi], edx
cmp dword [edi + 4], ecx
jbe 0x48713c
mov dword [esp - 0x34], edx
movsx ax, byte [ebp + ecx - 4]
mov word [edx + ecx*2], ax
inc ecx
mov dword [esp - 0x10], edi
cmp ecx, dword [edi + 4]
jb 0x487128
cmp byte [0x4bb19c], 0
mov ecx, ecx
je 0x4879d0
mov ecx, dword [ebp + 0xc]
push ebx
mov dword [esp - 0xc], edi
push esi
mov dword [ebp - 0x60], 0x3b6065e
add dword [ebp - 0x60], 0x8e74af8
mov esp, esp
add dword [ebp - 0x60], 0x325d2688
add dword [ebp - 0x60], 0x631cfe8
add dword [ebp - 0x60], 0xb9cc838
xor dword [ebp - 0x60], 0x50c90ffe
mov dword [esp - 0x3c], 0x564b1bef
mov ebx, ecx
movzx eax, word [ecx]
mov dword [ebp - 0x5c], 0x7c5bebd
mov dword [esp - 0x1c], esi
add dword [ebp - 0x5c], 0x338ddf2
add dword [ebp - 0x5c], 0x18d36831
xor dword [ebp - 0x5c], 0x56ae4e0f
add dword [ebp - 0x5c], 0x86489f9
xchg esi, esi
sub dword [ebp - 0x5c], 0x7de0d4e8
mov dword [ebp - 0x58], 0x4a509a4
add dword [ebp - 0x58], 0x2d98fe94
sub dword [ebp - 0x58], 0x20016744
mov dword [esp - 0x1c], esp
xor dword [ebp - 0x58], 0x2d432bf8
xor dword [ebp - 0x58], 0x732af67a
xor dword [ebp - 0x58], 0x70a325d0
sub dword [ebp - 0x58], 0x3cf658a6
mov dword [esp - 0x2c], ebp
mov dword [ebp - 0x54], 0x42be5853
xor dword [ebp - 0x54], 0x1e74dca6
xor dword [ebp - 0x54], 0x3b62492c
xor dword [ebp - 0x54], 0x5564ad26
mov dword [esp - 0x14], ebp
add dword [ebp - 0x54], 0x3d61bf03
sub dword [ebp - 0x54], 0x702e2001
mov dword [ebp - 8], ecx
mov dword [esp - 0x14], ecx
test ax, ax
je 0x48742f
mov edx, eax
cmp dx, 0x2f
mov dword [esp - 0x28], edx
je 0x487250
cmp dx, 0x5c
je 0x487250
add ebx, 2
xchg edi, edi
jmp 0x487416
mov edi, ebx
sub edi, ecx
mov dword [esp - 0x14], 0x491281e3
sar edi, 1
je 0x48740c
xor ecx, ecx
xchg esi, esi
lea esi, [edi + 1]
mov eax, esi
mov edx, 0x6d0fd110
mov dword [esp - 0x44], edx
sub edx, 0x52e29b0a
xor edx, 0x40538ea
add edx, 0xf1fab6a
add edx, 0x241fd466
mov dword [esp - 0x38], 0x522b6992
sub edx, 0x51678eba
mul edx
seto cl
neg ecx
xchg ebp, ebp
or ecx, eax
push ecx
call fcn.0048b720
mov dword [esp - 0x14], 0x547f29e3
push edi
push dword [ebp - 8]
mov dword [ebp + 0xc], eax
push esi
mov dword [esp - 0x10], 0x2367bf9
push eax
call fcn.0048c140
mov ecx, dword [ebp + 0xc]
xchg ebx, ebx
add esp, 0x14
mov esi, ecx
mov dword [ebp - 0x18], 0x67106c9d
sub dword [ebp - 0x18], 0x3a86ab4a
mov dword [esp - 0x28], edx
add dword [ebp - 0x18], 0x2f3df3a1
add dword [ebp - 0x18], 0xb3fa144
sub dword [ebp - 0x18], 0x59368d34
sub dword [ebp - 0x18], 0xdd0c904
mov esi, esi
lea edx, [esi + 2]
lea esp, [esp]
mov ax, word [esi]
add esi, 2
xchg ebx, ebx
test ax, ax
jne 0x48730c
sub esi, edx
mov dword [esp - 0x28], edi
lea edx, [ebp - 0x18]
sar esi, 1
mov dword [ebp - 0x14], esi
cmp esi, 2
mov ecx, ecx
jbe 0x487375
xor ecx, ecx
mov eax, esi
mov edx, 0x14119c8e
mov edx, edx
add edx, 0x4701d6fe
sub edx, 0x4b7f1b97
add edx, 0x1cc30db7
xchg edi, edi
sub edx, 0x2c5765aa
mul edx
seto cl
mov dword [esp - 0x10], edi
neg ecx
or ecx, eax
push ecx
call fcn.0048b720
mov ebx, ebx
mov ecx, dword [ebp + 0xc]
mov edx, eax
add esp, 4
mov dword [ebp - 0x18], edx
mov ebp, ebp
xor edi, edi
test esi, esi
je 0x4873d8
mov dword [esp - 0x3c], edx
mov esi, ecx
sub esi, edx
mov ecx, edi
lea edx, [edx + 2]
mov dword [esp - 0x44], 0x3ae6151
and ecx, 3
mov eax, 0x56c70db8
sub eax, 0x1d957c7e
mov dword [esp - 0x40], ecx
add eax, 0x840c3e1
sub eax, 0x12d8fa9
add eax, 0x33395ece
mov dword [esp - 0x2c], 0x17338441
shl ecx, 3
inc edi
sar eax, cl
mov dword [esp - 0x2c], 0x1e0afa50
cbw
xor ax, word [esi + edx - 2]
mov word [edx - 2], ax
cmp edi, dword [ebp - 0x14]
xchg esp, esp
jb 0x487383
lea eax, [ebp - 0x18]
push eax
xchg ebx, ebx
lea ecx, [ebp - 0x60]
call fcn.00442250
cmp dword [ebp - 0x14], 2
jbe 0x4873f9
xchg esp, esp
push dword [ebp - 0x18]
call fcn.0048b6f0
add esp, 4
push dword [ebp + 0xc]
mov dword [esp - 0x14], 0x5e2ae468
call fcn.0048b6f0
add esp, 4
lea ecx, [ebx + 2]
mov esi, esi
mov dword [ebp - 8], ecx
mov ebx, ecx
movzx eax, word [ebx]
mov dword [esp - 0x38], edx
mov edx, eax
test ax, ax
jne 0x487236
mov dword [esp - 0x30], ebx
mov edi, dword [ebp + 8]
push ebx
push ecx
xchg ebp, ebp
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp + 0xb]
call fcn.00486460
mov esi, esi
mov eax, dword [ebp - 0x5c]
xor ecx, ecx
xor bh, bh
xor bl, bl
xchg ebp, ebp
cmp ecx, eax
mov ecx, dword [ebp - 0x60]
sbb esi, esi
and esi, ecx
xchg edx, edx
test eax, eax
je 0x487460
lea eax, [ecx + eax*8]
jmp 0x487462
xor eax, eax
mov dword [ebp + 0xc], eax
xchg edx, edx
cmp esi, eax
je 0x4879b1
mov byte [ebp + 8], 0x15
add byte [ebp + 8], 0xb
mov ecx, ecx
xor byte [ebp + 8], 0x65
xor byte [ebp + 8], 0x65
sub byte [ebp + 8], 4
xchg ebp, ebp
test bh, bh
jne 0x48760c
nop
mov dword [esp - 4], 0x9570814
xchg esp, esp
add dword [esp - 4], 0x3d84e7fd
sub dword [esp - 4], 0x45569d48
add dword [esp - 4], 0x404e0f84
sub dword [esp - 4], 0x41d3623f
mov dword [esp - 0x1c], 0x1e2ae711
sub esp, 4
mov dword [ebp - 8], 0x7050b32e
sub dword [ebp - 8], 0x32b52c70
mov ebx, ebx
sub dword [ebp - 8], 0xa943d55
add dword [ebp - 8], 0x2a3fd7ae
xor dword [ebp - 8], 0x4a576c00
mov word [ebp - 4], 0xc7d
xchg esi, esi
add word [ebp - 4], 0x10e9
sub word [ebp - 4], 0x55e
xor word [ebp - 4], 0x29df
add word [ebp - 4], 0xb7
mov dword [esp - 0x28], ebx
xor word [ebp - 4], 0x61a1
mov byte [ebp - 2], 0x2f
add byte [ebp - 2], 0x4e
mov dword [esp - 0x1c], ebx
sub byte [ebp - 2], 0x54
xor byte [ebp - 2], 0x7f
xor byte [ebp - 2], 0x66
mov dword [esp - 0x1c], 0x1af42843
xor byte [ebp - 2], 9
sub byte [ebp - 2], 0x2c
mov dword [ebp - 0x1c], 0x27691d76
xor dword [ebp - 0x1c], 0x6395db1f
xchg edi, edi
xor dword [ebp - 0x1c], 0x2b94f48f
xor dword [ebp - 0x1c], 0x3c90ae7c
sub dword [ebp - 0x1c], 0x53f89c93
call fcn.0048b720
mov esi, esi
xor ecx, ecx
add esp, 4
mov edx, eax
mov dword [ebp - 0x20], edx
xchg esp, esp
cmp dword [ebp - 0x1c], ecx
jbe 0x487596
jmp 0x487582
movsx ax, byte [ebp + ecx - 8]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, dword [ebp - 0x1c]
mov dword [esp - 0x38], esp
jb 0x487582
nop
mov dword [esp - 4], 0x7dcd5e7e
sub dword [esp - 4], 0x513c447d
mov dword [esp - 0x3c], edi
sub dword [esp - 4], 0x215f9e64
add dword [esp - 4], 0xcb259c9
add dword [esp - 4], 0x53ed4511
mov dword [esp - 0x3c], edi
sub dword [esp - 4], 0x6bd11a76
sub esp, 4
lea eax, [ebp - 0x20]
xchg edi, edi
push eax
push esi
call fcn.00481830
mov ebx, ebx
add esp, 0xc
test eax, eax
sete bh
xchg esp, esp
cmp dword [ebp - 0x1c], 2
jbe 0x4878f1
push dword [ebp - 0x20]
mov dword [esp - 0x44], 0x2d8aff7f
call fcn.0048b6f0
add esp, 4
jmp 0x4878f1
test bl, bl
jne 0x4878f1
mov edx, edx
mov dword [ebp - 0x10], 0x268344ac
add dword [ebp - 0x10], 0x44084091
xor dword [ebp - 0x10], 0x141cd6c6
mov dword [esp - 0x2c], esi
xor dword [ebp - 0x10], 0x10e2056c
sub dword [ebp - 0x10], 0x6767f984
mov eax, dword [ebp - 0x10]
mov dword [esp - 0x34], edx
mov dword [ebp - 0xc], 0x2008d425
xor dword [ebp - 0xc], 0x6f59b20b
sub dword [ebp - 0xc], 0xc854a65
add dword [ebp - 0xc], 0x208132fa
mov dword [esp - 0x40], 0x6d6ffcc7
sub dword [ebp - 0xc], 0x44236da5
add dword [ebp - 0xc], 0x43647d34
sub dword [ebp - 0xc], 0x2141152d
mov ecx, dword [ebp - 0xc]
mov dword [esp - 0x34], 0x4dea870f
nop
mov dword [esp - 4], 0x7b141afe
xor dword [esp - 4], 0x3677abed
add dword [esp - 4], 0x17639673
mov dword [esp - 0x44], esi
xor dword [esp - 4], 0x6b932cfb
xor dword [esp - 4], 0xf546b6d
sub esp, 4
mov ecx, ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x24], 0x38d7b414
xor dword [ebp - 0x24], 0x94c0b4f
mov dword [esp - 0x1c], 0x590880f2
sub dword [ebp - 0x24], 0x26cda4ed
add dword [ebp - 0x24], 0x51209c66
xor dword [ebp - 0x24], 0x5beeb6dc
call fcn.0048b720
xchg esp, esp
xor ecx, ecx
add esp, 4
mov edx, eax
xchg ebx, ebx
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x24], ecx
jbe 0x487720
lea ecx, [ecx]
xchg ebp, ebp
movsx ax, byte [ebp + ecx - 0x40]
mov word [edx + ecx*2], ax
inc ecx
mov dword [esp - 0x24], 0x5c63f3f7
cmp ecx, dword [ebp - 0x24]
jb 0x487708
nop
xchg ecx, ecx
mov dword [esp - 4], 0x8ff3afe
add dword [esp - 4], 0x1da7b090
add dword [esp - 4], 0x462afd55
xor dword [esp - 4], 0x54a117c7
mov edx, edx
add dword [esp - 4], 0x3b9134fb
sub dword [esp - 4], 0x7402341e
sub esp, 4
lea eax, [ebp - 0x28]
mov ecx, ecx
push eax
push esi
call fcn.00481830
mov dword [esp - 0x10], esi
add esp, 0xc
test eax, eax
sete bl
cmp dword [ebp - 0x24], 2
xchg ebx, ebx
jbe 0x48778b
push dword [ebp - 0x28]
call fcn.0048b6f0
mov dword [esp - 0x24], 0x70eaf4ff
add esp, 4
test bl, bl
je 0x4878d7
mov dword [ebp - 0x18], 0x104e5efd
mov dword [esp - 0x30], 0x170a5d76
add dword [ebp - 0x18], 0x54e0a4cb
xor dword [ebp - 0x18], 0x33c20f6f
sub dword [ebp - 0x18], 0x160f7897
sub dword [ebp - 0x18], 0x1667f961
mov dword [esp - 0x20], edi
xor dword [ebp - 0x18], 0x35e53c7c
add dword [ebp - 0x18], 0x47cb640
mov eax, dword [ebp - 0x18]
mov dword [esp - 0x40], 0x78a4e80d
mov dword [ebp - 0x14], 0x3adba83
xor dword [ebp - 0x14], 0xa68b86c
add dword [ebp - 0x14], 0x1fa2fbe0
xor dword [ebp - 0x14], 0x3a88d9c0
mov dword [esp - 0x24], 0x4af240b4
add dword [ebp - 0x14], 0x4b78544c
xor dword [ebp - 0x14], 0x182f0854
mov ecx, dword [ebp - 0x14]
nop
xchg edx, edx
sub esp, 4
mov dword [esp], 0x17e25de5
xor dword [esp], 0x21670056
mov dword [esp - 0xc], 0x2c435dfc
xor dword [esp], 0x3a88ce37
add dword [esp], 0x35bfb884
add dword [esp], 0x3a27b497
mov dword [esp - 0x20], ebx
sub dword [esp], 0x7bf5008f
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x2c], 0x188649de
mov edx, edx
add dword [ebp - 0x2c], 0x46035670
xor dword [ebp - 0x2c], 0x3fe43a10
sub dword [ebp - 0x2c], 0x321aae56
mov dword [esp - 0x38], ecx
sub dword [ebp - 0x2c], 0x2f52ec00
call fcn.0048b720
xor ecx, ecx
mov dword [esp - 0x44], esi
add esp, 4
mov edx, eax
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x2c], ecx
mov dword [esp - 0x28], 0x5f2daa50
jbe 0x4878b3
movsx ax, byte [ebp + ecx - 0x48]
mov word [edx + ecx*2], ax
inc ecx
mov dword [esp - 0x10], 0x24398f43
cmp ecx, dword [ebp - 0x2c]
jb 0x48789b
lea eax, [ebp - 0x30]
mov ecx, esi
mov dword [esp - 0x30], esi
push eax
call fcn.00480bb0
cmp dword [ebp - 0x2c], 2
xchg ecx, ecx
jbe 0x4878d7
push dword [ebp - 0x30]
call fcn.0048b6f0
add esp, 4
mov ecx, ecx
mov bl, 0x30
xor bl, 0x66
sub bl, 0x32
sub bl, 0xf
mov edi, edi
add bl, 0x5e
sub bl, 0x60
sub bl, 0x12
mov dword [esp - 0x10], esi
mov dword [ebp - 0x34], 0x47859aff
add dword [ebp - 0x34], 0x2e7b8cb1
sub dword [ebp - 0x34], 0x2b444459
xor dword [ebp - 0x34], 0x4c8194b2
mov dword [esp - 0x18], 0x24c29351
xor dword [ebp - 0x34], 0x7b031bdc
xor dword [ebp - 0x34], 0x51d6e3d5
sub dword [ebp - 0x34], 0x2ce88feb
xor eax, eax
mov ebp, ebp
jmp 0x487937
movsx cx, byte [ebp + eax + 8]
mov word [ebp + eax*2 - 0x38], cx
mov dword [esp - 0x40], 0x703894d2
inc eax
cmp eax, dword [ebp - 0x34]
jb 0x487937
push esi
mov dword [esp - 0xc], ecx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x50]
xchg ecx, ecx
push eax
call fcn.00480d90
add esp, 0xc
mov ecx, edi
mov dword [esp - 0xc], ecx
push eax
call fcn.004814a0
cmp dword [ebp - 0x4c], 2
mov dword [esp - 0x30], ebx
jbe 0x48798a
push dword [ebp - 0x50]
call fcn.0048b6f0
add esp, 4
mov esi, esi
cmp dword [ebp - 0x34], 2
jbe 0x48799d
push dword [ebp - 0x38]
xchg esp, esp
call fcn.0048b6f0
add esp, 4
add esi, 8
mov dword [esp - 0x28], 0x79437105
cmp esi, dword [ebp + 0xc]
jne 0x487487
lea ecx, [ebp - 0x60]
mov ebp, ebp
call fcn.004426d0
pop esi
pop ebx
mov ebx, ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
mov dword [esp - 0x40], 0x20282250
ret 8
mov byte [ebp + 8], 0x39
add byte [ebp + 8], 0x1e
xor byte [ebp + 8], 0x2c
sub byte [ebp + 8], 0x5c
xchg ecx, ecx
xor byte [ebp + 8], 0x40
add byte [ebp + 8], 0x1b
sub byte [ebp + 8], 0x5e
xor ecx, ecx
xchg edx, edx
mov dword [ebp - 0x34], 0x797f01f6
sub dword [ebp - 0x34], 0x3b0d81f8
xor dword [ebp - 0x34], 0x9814a00
xchg ebp, ebp
sub dword [ebp - 0x34], 0x86481bc
sub dword [ebp - 0x34], 0x2f8bb441
jmp 0x487a1f
movsx ax, byte [ebp + ecx + 8]
mov word [ebp + ecx*2 - 0x38], ax
inc ecx
mov esi, esi
cmp ecx, dword [ebp - 0x34]
jb 0x487a1f
push dword [ebp + 0xc]
lea eax, [ebp - 0x38]
xchg esp, esp
push eax
lea eax, [ebp - 0x50]
push eax
mov dword [esp - 0x28], ebp
call fcn.00481010
add esp, 0xc
mov ecx, edi
push eax
mov edi, edi
call fcn.004814a0
cmp dword [ebp - 0x4c], 2
jbe 0x487a68
push dword [ebp - 0x50]
xchg esp, esp
call fcn.0048b6f0
add esp, 4
cmp dword [ebp - 0x34], 2
mov dword [esp - 0x20], esi
jbe 0x487a85
push dword [ebp - 0x38]
call fcn.0048b6f0
mov dword [esp - 0x40], 0x4dc7b820
add esp, 4
mov eax, edi
pop edi
mov esp, ebp
mov esi, esi
pop ebp
ret 8