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

Disassembly:
sub esp, 0xc
mov dword [esp + 4], ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
test ecx, ecx
je 0x10057de3
mov ebx, dword [esp + 0x20]
test ebx, ebx
jne 0x10057ba5
test esi, esi
jne 0x10057de3
cmp edx, 3
je 0x10057bdb
cmp edx, 4
je 0x10057bdb
cmp edx, 5
je 0x10057bdb
cmp edx, 6
je 0x10057bdb
cmp edx, 7
je 0x10057bdb
cmp edx, 8
je 0x10057bdb
cmp edx, 0xa
je 0x10057bdb
cmp edx, 0xb
je 0x10057bdb
cmp edx, 0xc
je 0x10057bdb
cmp edx, 0xd
jne 0x10057de3
push ecx
mov byte [ecx + 0x225], 0
mov byte [ecx + 0x224], dl
call fcn.10057b03
mov edi, eax
mov dword [esp + 0x1c], edi
pop ecx
test edi, edi
jne 0x10057de8
mov eax, dword [esp + 0x14]
movzx ecx, byte [eax + 0x224]
lea ebp, [eax + 0xe0]
sub ecx, 3
je 0x10057d61
sub ecx, 1
je 0x10057d24
dec ecx
sub ecx, 1
je 0x10057cd2
sub ecx, 1
je 0x10057c8b
sub ecx, 1
jne 0x10057de3
mov edx, pe_nt_image_headers32
mov dword [esp + 0x10], edx
cmp esi, edx
jbe 0x10057d6c
test ebx, ebx
je 0x10057d1a
push esi
mov edx, ebx
mov ecx, eax
call fcn.10057721
mov edi, eax
pop ecx
test edi, edi
jne 0x10057ddf
mov ecx, dword [esp + 0x14]
mov edx, ebp
call fcn.100579ad
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x10057ddf
push 0x40
mov eax, dword [esp + 0x14]
pop esi
jmp 0x10057db1
mov edx, pe_nt_image_headers32
mov dword [esp + 0x10], edx
cmp esi, edx
jbe 0x10057d6c
test ebx, ebx
je 0x10057d1a
push esi
mov edx, ebx
mov ecx, eax
call fcn.10057721
mov edi, eax
pop ecx
test edi, edi
jne 0x10057ddf
mov ecx, dword [esp + 0x14]
mov edx, ebp
call fcn.10057a7b
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x10057ddf
push 0x30
jmp 0x10057c81
push 0x40
pop ecx
mov dword [esp + 0x10], ecx
cmp esi, ecx
jbe 0x10057d6c
test ebx, ebx
je 0x10057d1a
push esi
mov edx, ebx
mov ecx, eax
call fcn.10058712
mov edi, eax
pop ecx
test edi, edi
jne 0x10057ddf
mov ecx, dword [esp + 0x14]
mov edx, ebp
call fcn.100588e5
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x10057ddf
push 0x20
jmp 0x10057dad
mov edi, 0xffffff53
jmp 0x10057ddf
push 0x40
pop ecx
mov dword [esp + 0x10], ecx
cmp esi, ecx
jbe 0x10057d6c
push esi
mov edx, ebx
mov ecx, eax
call fcn.10053ecc
mov edi, eax
pop ecx
test edi, edi
jne 0x10057ddf
mov ecx, dword [esp + 0x14]
mov edx, ebp
call fcn.10053fe0
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x10057ddf
push 0x14
jmp 0x10057dad
push 0x40
pop ecx
mov dword [esp + 0x10], ecx
cmp esi, ecx
ja 0x10057d85
test ebx, ebx
je 0x10057d7b
push esi
push ebx
push ebp
call fcn.10061840
add esp, 0xc
mov eax, dword [esp + 0x10]
cmp esi, eax
jae 0x10057dc2
jmp 0x10057db1
push esi
mov edx, ebx
mov ecx, eax
call fcn.1005ae3c
mov edi, eax
pop ecx
test edi, edi
jne 0x10057ddf
mov ecx, dword [esp + 0x14]
mov edx, ebp
call fcn.1005af32
mov edi, eax
mov dword [esp + 0x18], eax
test edi, edi
jne 0x10057ddf
push 0x10
pop esi
push 0x40
pop eax
sub eax, esi
push eax
lea eax, [esi + ebp]
push 0
push eax
call fcn.10061dc0
add esp, 0xc
mov edi, dword [esp + 0x10]
mov al, byte [ebp]
xor al, 0x5c
mov byte [ebp + 0x80], al
xor byte [ebp], 0x36
inc ebp
sub edi, 1
jne 0x10057dc6
mov edi, dword [esp + 0x18]
mov eax, edi
jmp 0x10057de8
mov eax, 0xffffff53
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret