Function at 0x598fe0
Capabilities:
Authenticate hmac

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d72de
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x6a7c78]
xor eax, ebp
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x18]
call fcn.004aed60
mov dword [ebp - 0x180], 0x40
cmp dword [ebp + 0x14], 3
je 0x599029
cmp dword [ebp + 0x14], 2
jne 0x599033
mov dword [ebp - 0x180], 0x80
lea ecx, [ebp - 0x17c]
call fcn.004b0430
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x180]
jle 0x599088
lea ecx, [ebp - 0x17c]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004d95e0
add esp, 0x10
lea ecx, [ebp - 0x17c]
call fcn.005a6d60
mov dword [ebp + 0xc], eax
mov edx, dword [ebp + 0x14]
push edx
call fcn.004d9360
add esp, 4
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x180]
jle 0x59909c
mov ecx, dword [ebp - 0x180]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp - 0x180]
push edx
push 0
lea eax, [ebp - 0x144]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x180]
push ecx
push 0
lea edx, [ebp - 0xbc]
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x144]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0xbc]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x2c], 0
jmp 0x59910c
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x180]
jge 0x599149
mov edx, dword [ebp - 0x2c]
movzx eax, byte [ebp + edx - 0x144]
xor eax, 0x36
mov ecx, dword [ebp - 0x2c]
mov byte [ebp + ecx - 0x144], al
mov edx, dword [ebp - 0x2c]
movzx eax, byte [ebp + edx - 0xbc]
xor eax, 0x5c
mov ecx, dword [ebp - 0x2c]
mov byte [ebp + ecx - 0xbc], al
jmp 0x599103
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x144]
mov dword [edx + 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x180]
mov dword [ecx + 0x404], edx
lea ecx, [ebp - 0x28]
call fcn.004b0430
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004d9490
add esp, 0xc
lea ecx, [ebp - 0x160]
call fcn.004b0430
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x180]
push eax
lea ecx, [ebp - 0xbc]
push ecx
lea ecx, [ebp - 0x160]
call fcn.004b1d20
lea edx, [ebp - 0x28]
push edx
lea ecx, [ebp - 0x160]
call fcn.004af490
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
lea ecx, [ebp - 0x160]
call fcn.004eff70
push eax
lea ecx, [ebp - 0x160]
call fcn.005a6d60
push eax
call fcn.004d95e0
add esp, 0x10
mov byte [ebp - 0x181], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x160]
call fcn.004b0e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.004b0e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x17c]
call fcn.004b0e70
mov al, byte [ebp - 0x181]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.004adf6a
mov esp, ebp
pop ebp
ret