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

Disassembly:
mov eax, 0x3e8
call fcn.00693bc0
sub rsp, rax
mov rax, qword [0x0072f1d0]
mov qword [rsp + 0x390], rax
mov rax, qword [rsp + reloc.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov qword [rsp + 0x3e0], rbx
mov rbx, qword [rsp + 0x420]
cmp rbx, 0x100000
mov qword [rsp + reloc.MFC42u.dll_CEnumConnPoints::AddConnPoint], rbp
mov qword [rsp + 0x3d0], rsi
mov qword [rsp + 0x3c8], rdi
mov qword [rsp + 0x3c0], r12
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x428]
mov r12d, Ordinal_41
mov qword [rsp + 0x3b8], r13
mov qword [rsp + 0x70], r9
mov rsi, r8
mov qword [rsp + 0x98], r8
mov qword [rsp + 0x88], rax
mov qword [rsp + 0xa0], rdx
mov r13, rcx
mov qword [rsp + 0x90], rcx
mov edi, 0x40
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x20], 8
mov bpl, 1
jb 0x59ba10
lea r8, str.data_plus_mac_plus_padding_size___10241024
lea rcx, [0x0073b4c0]
mov edx, 0x1b3
call fcn.005cc540
mov rcx, r13
call fcn.005b44f0
mov rcx, rax
call fcn.005b4470
cmp eax, 0x2a1
mov r11d, eax
jg 0x59bb32
cmp eax, 0x2a1
je 0x59baf4
cmp eax, 4
je 0x59bab3
cmp eax, edi
je 0x59ba80
cmp eax, 0x2a0
jne 0x59bb40
lea rcx, [rsp + 0xe0]
call fcn.005ee2e0
lea rax, [0x0059b7c0]
lea r13, [0x005ee490]
mov ecx, reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x24], ecx
jmp 0x59bbd5
lea rcx, [rsp + 0xe0]
call fcn.005eed20
lea rax, [0x0059b730]
lea r13, [0x005eeb60]
mov ecx, reloc.WS2_32.dll_sendto
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x24], ecx
jmp 0x59bbd5
lea rcx, [rsp + 0xe0]
call fcn.005ca860
lea rax, [0x0059b6b0]
lea r13, [0x005ca6c0]
mov ecx, reloc.WS2_32.dll_recv
mov r12d, gethostbyaddr
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
xor bpl, bpl
mov dword [rsp + 0x24], ecx
mov dword [rsp + 0x48], r12d
jmp 0x59bbd5
lea rcx, [rsp + 0xe0]
call fcn.005ed6d0
mov ecx, gethostbyaddr
lea rax, [0x0059b8a0]
lea r13, [0x005edf30]
mov dword [rsp + 0x24], ecx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
lea edi, [rcx + 0x50]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
jmp 0x59bbd5
sub r11d, 0x2a2
je 0x59bb9d
dec r11d
je 0x59bb6d
lea r8, [0x0073b4d0]
lea rcx, [0x0073b4d8]
mov edx, 0x1e9
call fcn.005cc540
test rsi, rsi
je 0x59c28e
mov qword [rsi], 0xffffffffffffffff
jmp 0x59c28e
lea rcx, [rsp + 0xe0]
call fcn.005ee270
lea rax, [0x0059b7c0]
lea r13, [0x005ee490]
mov ecx, Ordinal_30
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x24], ecx
jmp 0x59bbd5
lea rcx, [rsp + 0xe0]
call fcn.005ed760
lea rax, [0x0059b8a0]
lea r13, [0x005edf30]
mov ecx, edi
mov dword [rsp + 0x24], edi
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov edi, 0x80
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
movzx r9d, byte [rsp + 0x438]
mov qword [rsp + 0x3b0], r14
mov r14d, reloc.WS2_32.dll_listen
test r9b, r9b
je 0x59bbfd
mov eax, dword [rsp + 0x430]
lea r14d, [r12 + rax + 0xb]
mov esi, dword [rsp + 0x418]
test r9b, r9b
mov qword [rsp + 0x3a8], r15
mov eax, 2
mov r15d, 6
cmovne r15d, eax
xor edx, edx
sub esi, ecx
add esi, r14d
mov eax, ebx
mov ebx, dword [rsp + 0x20]
sub eax, ecx
xor ecx, ecx
xor r12d, r12d
add eax, r14d
mov dword [rsp + 0x34], r15d
mov dword [rsp + 0x30], r12d
add eax, ebx
lea eax, [rax + rdi - 1]
div edi
xor edx, edx
mov r8d, eax
mov eax, esi
div edi
mov dword [rsp + 0x7c], eax
mov dword [rsp + 0x2c], edx
xor edx, edx
lea eax, [rsi + rbx]
div edi
test r9b, r9b
setne cl
mov dword [rsp + 0x80], eax
add ecx, r15d
cmp r8d, ecx
jbe 0x59bc83
mov r12d, r8d
sub r12d, r15d
mov dword [rsp + 0x30], r12d
imul r12d, edi
shl esi, 3
test r9b, r9b
jne 0x59bd22
lea rcx, [rsp + 0x210]
mov r8d, edi
xor edx, edx
lea esi, [rsi + rdi*8]
mov ebx, edi
call sub.msvcrt.dll_memset
mov eax, dword [rsp + 0x430]
cmp eax, 0x80
jbe 0x59bcd3
lea r8, str.mac_secret_length___sizeof_hmac_pad_
lea rcx, str.._ssl_s3_cbc.c
mov edx, 0x242
call fcn.005cc540
mov eax, dword [rsp + 0x430]
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0x210]
mov r8d, eax
call sub.msvcrt.dll_memcpy
test edi, edi
je 0x59bd0b
lea rax, [rsp + 0x210]
nop
nop
nop
xor byte [rax], 0x36
inc rax
dec rbx
jne 0x59bd00
lea rdx, [rsp + 0x210]
lea rcx, [rsp + 0xe0]
call r13
mov ebx, dword [rsp + 0x20]
test bpl, bpl
je 0x59bd80
lea eax, [rbx - 4]
lea rcx, [rsp + 0x1c0]
xor edx, edx
mov r8d, eax
mov ebx, eax
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x20]
mov edx, esi
lea eax, [r8 - 3]
shr edx, 0x10
mov r11d, esi
mov byte [rsp + rax + 0x1c0], dl
lea eax, [r8 - 2]
shr r11d, 0x18
mov edx, esi
mov byte [rsp + rbx + 0x1c0], r11b
shr edx, 8
mov byte [rsp + rax + 0x1c0], dl
lea eax, [r8 - 1]
mov byte [rsp + rax + 0x1c0], sil
jmp 0x59bdcd
lea rcx, [rsp + 0x1c0]
mov r8d, ebx
xor edx, edx
call sub.msvcrt.dll_memset
lea eax, [rbx - 5]
mov r11d, esi
shr r11d, 0x18
mov edx, esi
mov byte [rsp + rax + 0x1c0], r11b
lea eax, [rbx - 6]
shr edx, 0x10
mov byte [rsp + rax + 0x1c0], dl
lea eax, [rbx - 7]
mov edx, esi
shr edx, 8
mov byte [rsp + rax + 0x1c0], dl
lea eax, [rbx - 8]
mov byte [rsp + rax + 0x1c0], sil
test r12d, r12d
je 0x59bef9
cmp byte [rsp + 0x438], 0
je 0x59be81
mov rsi, qword [rsp + 0x70]
lea rcx, [rsp + 0xe0]
mov ebx, r14d
mov rdx, rsi
sub ebx, edi
call r13
mov edx, edi
lea rcx, [rsp + 0x290]
mov r8d, ebx
add rdx, rsi
mov ebp, ebx
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsp + 0x50]
mov r8d, edi
lea rcx, [rsp + rbx + 0x290]
sub r8d, ebx
call sub.msvcrt.dll_memcpy
lea rdx, [rsp + 0x290]
lea rcx, [rsp + 0xe0]
call r13
xor edx, edx
mov eax, r12d
div edi
dec eax
cmp eax, 1
jbe 0x59bef9
mov r15, qword [rsp + 0x50]
mov ebx, edi
lea esi, [rax - 1]
nop
nop
mov edx, ebx
lea rcx, [rsp + 0xe0]
sub rdx, rbp
add rdx, r15
call r13
add ebx, edi
dec rsi
jne 0x59be60
mov r15d, dword [rsp + 0x34]
jmp 0x59bef9
mov rsi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x50]
lea rcx, [rsp + 0x290]
mov rax, qword [rsi]
lea r8d, [rdi - 0xd]
mov rdx, rbp
mov qword [rcx], rax
mov eax, dword [rsi + 8]
mov dword [rcx + 8], eax
movzx eax, byte [rsi + 0xc]
mov byte [rcx + 0xc], al
lea rcx, [rsp + 0x29d]
call sub.msvcrt.dll_memcpy
lea rdx, [rsp + 0x290]
lea rcx, [rsp + 0xe0]
call r13
xor edx, edx
mov eax, r12d
div edi
cmp eax, 1
jbe 0x59bef9
mov ebx, edi
lea esi, [rax - 1]
nop
mov eax, ebx
lea rcx, [rsp + 0xe0]
lea rdx, [rax + rbp - 0xd]
call r13
add ebx, edi
dec rsi
jne 0x59bee0
mov ebp, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x20]
xor eax, eax
mov qword [rsp + 0x1d0], rax
mov qword [rsp + 0x1d8], rax
mov qword [rsp + 0x1e0], rax
mov qword [rsp + 0x1e8], rax
mov qword [rsp + 0x1f0], rax
mov qword [rsp + 0x1f8], rax
mov qword [rsp + 0x200], rax
mov qword [rsp + 0x208], rax
lea eax, [rbp + r15]
cmp ebp, eax
movsxd rdx, r12d
movsxd r10, r14d
mov qword [rsp + 0x58], rdx
mov dword [rsp + 0x78], eax
ja 0x59c158
nop
mov eax, ebp
xor ebx, ebx
xor r11d, r11d
xor eax, dword [rsp + 0x7c]
lea r15d, [rax - 1]
not eax
sar eax, 0x1f
sar r15d, 0x1f
and r15b, al
mov eax, ebp
xor eax, dword [rsp + 0x80]
lea esi, [rax - 1]
not eax
sar esi, 0x1f
sar eax, 0x1f
and sil, al
test edi, edi
je 0x59c0ea
mov r8d, dword [rsp + 0x2c]
mov r13, rdx
lea eax, [r8 + 1]
mov r9d, r8d
movzx r8d, r15b
not eax
mov dword [rsp + 0x34], r8d
mov r8d, dword [rsp + 0x2c]
sar eax, 0x1f
not r9d
mov ebp, r8d
mov dword [rsp + 0x60], eax
movzx eax, sil
sar r9d, 0x1f
not al
sub r13, r10
neg ebp
or al, r15b
mov dword [rsp + 0x64], r9d
mov byte [rsp + 0x28], al
mov eax, edi
sub eax, ecx
add r13, qword [rsp + 0x50]
mov dword [rsp + 0x68], eax
jmp 0x59bff5
mov r8d, dword [rsp + 0x2c]
xor r10b, r10b
cmp r12d, r14d
jae 0x59c009
mov rax, qword [rsp + 0x70]
movzx r10d, byte [rdx + rax]
jmp 0x59c020
mov ecx, r14d
mov eax, r12d
add rcx, qword [rsp + 0x420]
cmp rax, rcx
jae 0x59c020
mov r10b, byte [r13]
movzx ecx, r9b
inc rdx
mov eax, ebx
xor eax, r8d
mov qword [rsp + 0x58], rdx
mov edx, ebx
or eax, ebp
sar edx, 0x1f
mov r9d, ebx
not eax
inc r12d
inc r13
sar eax, 0x1f
movzx r8d, al
movzx eax, dl
and ecx, eax
or r8d, ecx
mov ecx, dword [rsp + 0x2c]
and r8d, dword [rsp + 0x34]
inc ecx
sub r9d, ecx
mov eax, ecx
xor eax, ebx
or r9d, eax
movzx eax, byte [rsp + 0x60]
not r9d
and al, dl
sar r9d, 0x1f
or r9b, al
movzx eax, r8b
and r8b, 0x80
and r9b, r15b
not al
and al, r10b
not r9b
or al, r8b
and r9b, al
and r9b, byte [rsp + 0x28]
cmp ebx, dword [rsp + 0x68]
jb 0x59c0c0
movsxd rax, dword [rsp + 0x20]
movsxd rcx, edi
movzx edx, sil
sub rax, rcx
add rax, r11
movzx ecx, byte [rsp + rax + 0x1c0]
and cl, dl
not dl
and r9b, dl
or r9b, cl
mov rdx, qword [rsp + 0x58]
mov byte [rsp + r11 + 0x310], r9b
mov r9d, dword [rsp + 0x64]
inc ebx
inc ebp
inc r11
cmp ebx, edi
jb 0x59bff0
mov r13, qword [rsp + 0x38]
mov ebp, dword [rsp + 0x30]
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0xe0]
call r13
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0xe0]
call qword [rsp + 0x40]
mov r15d, dword [rsp + 0x24]
test r15d, r15d
je 0x59c13a
xor ecx, ecx
mov r8, r15
movzx eax, byte [rsp + rcx + 0x310]
inc rcx
and al, sil
or byte [rsp + rcx + 0x1cf], al
dec r8
jne 0x59c120
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x20]
inc ebp
cmp ebp, dword [rsp + 0x78]
mov dword [rsp + 0x30], ebp
movsxd r10, r14d
jbe 0x59bf60
jmp 0x59c15d
mov r15d, dword [rsp + 0x24]
lea rcx, [rsp + 0xa8]
call fcn.005d2780
mov rdx, qword [rsp + 0x90]
lea rcx, [rsp + 0xa8]
mov rdx, qword [rdx]
xor r8d, r8d
call fcn.005d27f0
cmp byte [rsp + 0x438], 0
mov r14, qword [rsp + 0x3b0]
je 0x59c1ff
mov ebx, dword [rsp + 0x48]
lea rcx, [rsp + 0x210]
mov edx, 0x5c
mov r8, rbx
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x430]
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0xa8]
call fcn.005d2a60
lea rdx, [rsp + 0x210]
lea rcx, [rsp + 0xa8]
mov r8, rbx
call fcn.005d2a60
lea rdx, [rsp + 0x1d0]
lea rcx, [rsp + 0xa8]
mov r8d, r15d
call fcn.005d2a60
jmp 0x59c24b
test edi, edi
je 0x59c21b
lea rax, [rsp + 0x210]
mov ecx, edi
nop
xor byte [rax], 0x6a
inc rax
dec rcx
jne 0x59c210
lea rdx, [rsp + 0x210]
lea rcx, [rsp + 0xa8]
mov r8d, edi
call fcn.005d2a60
lea rdx, [rsp + 0x1d0]
lea rcx, [rsp + 0xa8]
mov r8d, r15d
call fcn.005d2a60
mov rdx, qword [rsp + 0xa0]
lea r8, [rsp + 0x6c]
lea rcx, [rsp + 0xa8]
call fcn.005d2c30
mov r11, qword [rsp + 0x98]
mov r15, qword [rsp + 0x3a8]
test r11, r11
je 0x59c281
mov eax, dword [rsp + 0x6c]
mov qword [r11], rax
lea rcx, [rsp + 0xa8]
call fcn.005d2b30
mov r13, qword [rsp + 0x3b8]
mov r12, qword [rsp + 0x3c0]
mov rdi, qword [rsp + 0x3c8]
mov rsi, qword [rsp + 0x3d0]
mov rbp, qword [rsp + reloc.MFC42u.dll_CEnumConnPoints::AddConnPoint]
mov rbx, qword [rsp + 0x3e0]
mov rcx, qword [rsp + 0x390]
call fcn.00693b90
add rsp, 0x3e8
ret