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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x290]
sub rsp, 0x390
mov rax, qword [0x1803c1370]
xor rax, rsp
mov qword [rbp + 0x270], rax
mov rax, qword [rbp + 0x2f0]
mov rbx, qword [rbp + 0x300]
mov r13d, 0x28
mov qword [rsp + 0x58], rax
mov rax, qword [rbp + 0x308]
mov r12d, 8
mov qword [rsp + 0x60], r9
mov rsi, r8
mov qword [rbp - 0x48], r8
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x50], rdx
mov r14, rcx
mov qword [rbp - 0x58], rcx
mov edi, 0x40
mov dword [rsp + 0x50], r13d
mov dword [rsp + 0x20], r12d
cmp rbx, 0x100000
jb 0x18018d54c
lea r8, str.data_plus_mac_plus_padding_size___10241024
lea rcx, str.D:_tinderboxwin_4.2_srclibsopenssl_0.9.8y_ssl_s3_cbc.c
mov edx, 0x1c4
call sym.VBoxRT.dll_OpenSSLDie
mov rcx, r14
call sym.VBoxRT.dll_EVP_MD_type
mov r11d, eax
cmp eax, 0x2a1
jg 0x18018d637
je 0x18018d5fc
cmp eax, 4
je 0x18018d5ca
cmp eax, edi
je 0x18018d5a3
cmp eax, 0x2a0
jne 0x18018d645
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_SHA256_Init
mov r9d, 0x20
lea rdx, [0x18018d340]
mov dword [rsp + 0x24], r9d
lea rax, [sym.VBoxRT.dll_SHA256_Transform]
jmp 0x18018d6c4
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_SHA1_Init
mov r9d, reloc.WS2_32.dll_sendto
lea rdx, [0x18018d2b0]
mov dword [rsp + 0x24], r9d
lea rax, [sym.VBoxRT.dll_SHA1_Transform]
jmp 0x18018d6c4
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_MD5_Init
mov r9d, reloc.WS2_32.dll_recv
mov r13d, gethostbyname
lea rdx, [0x18018d240]
lea rax, [sym.VBoxRT.dll_MD5_Transform]
mov dword [rsp + 0x24], r9d
mov dword [rsp + 0x50], r13d
jmp 0x18018d6c4
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_SHA384_Init
lea rax, [0x18018d420]
mov r9d, gethostbyname
mov r12d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x24], r9d
lea rax, [sym.VBoxRT.dll_SHA512_Transform]
lea edi, [r9 + 0x50]
mov dword [rsp + 0x20], r12d
jmp 0x18018d6c9
sub r11d, 0x2a2
je 0x18018d696
dec r11d
je 0x18018d672
lea r8, [0x180236500]
lea rcx, str.D:_tinderboxwin_4.2_srclibsopenssl_0.9.8y_ssl_s3_cbc.c
mov edx, 0x1f9
call sym.VBoxRT.dll_OpenSSLDie
test rsi, rsi
je 0x18018dc5d
mov qword [rsi], 0xffffffffffffffff
jmp 0x18018dc5d
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_SHA224_Init
mov r9d, 0x1c
lea rdx, [0x18018d340]
mov dword [rsp + 0x24], r9d
lea rax, [sym.VBoxRT.dll_SHA256_Transform]
jmp 0x18018d6c4
lea rcx, [rbp - 0x40]
call sym.VBoxRT.dll_SHA512_Init
mov r12d, reloc.WS2_32.dll_recv
mov r9d, edi
mov dword [rsp + 0x24], edi
lea rdx, [0x18018d420]
lea rax, [sym.VBoxRT.dll_SHA512_Transform]
mov dword [rsp + 0x20], r12d
mov edi, 0x80
mov qword [rsp + 0x48], rdx
movzx r10d, byte [rbp + 0x318]
mov ecx, reloc.WS2_32.dll_listen
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x388], r15
mov dword [rsp + 0x28], ecx
test r10b, r10b
je 0x18018d6fb
mov eax, dword [rbp + 0x310]
lea ecx, [r13 + rax + 0xb]
mov dword [rsp + 0x28], ecx
mov esi, dword [rbp + 0x2f8]
test r10b, r10b
mov eax, 2
mov r14d, 6
mov dword [rsp + 0x38], 0
cmovne r14d, eax
xor edx, edx
sub esi, r9d
add esi, ecx
mov eax, ebx
xor r13d, r13d
sub eax, r9d
mov dword [rsp + 0x40], r14d
add eax, ecx
xor ecx, ecx
add eax, r12d
lea eax, [rax + rdi - 1]
div edi
xor edx, edx
mov r8d, eax
mov eax, esi
div edi
mov r15d, eax
mov dword [rsp + 0x3c], eax
lea eax, [rsi + r12]
mov dword [rsp + 0x68], edx
xor edx, edx
div edi
test r10b, r10b
setne cl
mov r12d, eax
mov dword [rsp + 0x2c], eax
add ecx, r14d
cmp r8d, ecx
jbe 0x18018d77f
mov r9d, r8d
sub r9d, r14d
mov r13d, r9d
mov dword [rsp + 0x38], r9d
imul r13d, edi
shl esi, 3
test r10b, r10b
jne 0x18018d80a
lea rcx, [rbp + 0x170]
mov r8d, edi
xor edx, edx
lea esi, [rsi + rdi*8]
mov ebx, edi
call sub.MSVCR100.dll_memset
mov eax, dword [rbp + 0x310]
cmp eax, 0x80
jbe 0x18018d7cc
lea r8, str.mac_secret_length___sizeof_hmac_pad_
lea rcx, str.D:_tinderboxwin_4.2_srclibsopenssl_0.9.8y_ssl_s3_cbc.c
mov edx, 0x252
call sym.VBoxRT.dll_OpenSSLDie
mov eax, dword [rbp + 0x310]
mov rdx, qword [rbp - 0x80]
lea rcx, [rbp + 0x170]
mov r8d, eax
call sub.MSVCR100.dll_memcpy
test edi, edi
je 0x18018d7fb
lea rax, [rbp + 0x170]
nop word [rax + rax]
xor byte [rax], 0x36
inc rax
dec rbx
jne 0x18018d7f0
lea rdx, [rbp + 0x170]
lea rcx, [rbp - 0x40]
call qword [rsp + 0x30]
mov eax, dword [rsp + 0x20]
lea rcx, [rbp + 0xa0]
xor edx, edx
add eax, 0xfffffffc
mov r8d, eax
mov ebx, eax
call sub.MSVCR100.dll_memset
mov r11d, esi
mov edx, esi
shr edx, 0x10
shr r11d, 0x18
mov byte [rbp + rbx + 0xa0], r11b
mov r11d, dword [rsp + 0x20]
lea eax, [r11 - 3]
mov byte [rbp + rax + 0xa0], dl
lea eax, [r11 - 2]
mov edx, esi
shr edx, 8
mov byte [rbp + rax + 0xa0], dl
lea eax, [r11 - 1]
mov byte [rbp + rax + 0xa0], sil
test r13d, r13d
je 0x18018d994
cmp byte [rbp + 0x318], 0
je 0x18018d90d
mov ebx, dword [rsp + 0x28]
mov rdx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x30]
lea rcx, [rbp - 0x40]
sub ebx, edi
call rsi
mov edx, edi
lea rcx, [rbp + 0xf0]
add rdx, qword [rsp + 0x60]
mov r8d, ebx
mov r12d, ebx
call sub.MSVCR100.dll_memcpy
mov rdx, qword [rsp + 0x58]
mov r8d, edi
lea rcx, [rbp + rbx + 0xf0]
sub r8d, ebx
call sub.MSVCR100.dll_memcpy
lea rdx, [rbp + 0xf0]
lea rcx, [rbp - 0x40]
call rsi
xor edx, edx
mov eax, r13d
div edi
dec eax
cmp eax, 1
jbe 0x18018d98a
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x58]
mov ebx, edi
lea esi, [rax - 1]
nop
mov edx, ebx
lea rcx, [rbp - 0x40]
sub rdx, r12
add rdx, r14
call r15
add ebx, edi
dec rsi
jne 0x18018d8f0
mov r14d, dword [rsp + 0x40]
jmp 0x18018d985
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
lea r8d, [rdi - 0xd]
mov rax, qword [rcx]
mov qword [rbp + 0xf0], rax
mov eax, dword [rcx + 8]
mov dword [rbp + 0xf8], eax
movzx eax, byte [rcx + 0xc]
lea rcx, [rbp + 0xfd]
mov byte [rbp + 0xfc], al
call sub.MSVCR100.dll_memcpy
lea rdx, [rbp + 0xf0]
lea rcx, [rbp - 0x40]
call qword [rsp + 0x30]
xor edx, edx
mov eax, r13d
div edi
cmp eax, 1
jbe 0x18018d98f
mov r12, qword [rsp + 0x30]
mov r15, qword [rsp + 0x58]
mov ebx, edi
lea esi, [rax - 1]
nop
mov eax, ebx
lea rcx, [rbp - 0x40]
lea rdx, [rax + r15 - 0xd]
call r12
add ebx, edi
dec rsi
jne 0x18018d970
mov r15d, dword [rsp + 0x3c]
mov r12d, dword [rsp + 0x2c]
mov r11d, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x28]
xor eax, eax
movsxd r8, r13d
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], rax
mov qword [rbp + 0xc0], rax
mov qword [rbp + 0xc8], rax
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], rax
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0xe8], rax
mov eax, dword [rsp + 0x38]
add eax, r14d
mov r14d, dword [rsp + 0x38]
mov qword [rsp + 0x78], r8
mov dword [rsp + 0x2c], eax
cmp r14d, eax
ja 0x18018db95
movzx edx, r15b
movzx r9d, r12b
mov dword [rsp + 0x70], edx
mov dword [rsp + 0x6c], r9d
nop word [rax + rax]
movzx eax, r14b
mov ebx, r9d
mov esi, edx
xor esi, eax
xor ebx, eax
xor r10d, r10d
dec esi
dec ebx
xor r9d, r9d
sar esi, 0x1f
sar ebx, 0x1f
test edi, edi
je 0x18018db19
mov rdx, qword [rsp + 0x60]
mov r12, qword [rsp + 0x58]
mov eax, edi
sub eax, r11d
lea r11, [r8 + rdx]
movzx r14d, bl
mov dword [rsp + 0x40], eax
movsxd rax, ecx
not r14b
sub r12, rax
movzx r15d, r14b
mov eax, edi
sub r12, rdx
mov edx, dword [rsp + 0x68]
or r15b, sil
neg edx
add r8, rax
mov qword [rsp + 0x78], r8
mov dword [rsp + 0x3c], edx
xor r8b, r8b
cmp r13d, ecx
jae 0x18018da85
movzx r8d, byte [r11]
jmp 0x18018da99
add rcx, qword [rbp + 0x300]
mov eax, r13d
cmp rax, rcx
jae 0x18018da99
movzx r8d, byte [r12 + r11]
lea ecx, [rdx + r10]
inc r13d
inc r11
mov eax, ecx
not eax
sar eax, 0x1f
and al, sil
movzx edx, al
and al, 0x80
not dl
and dl, r8b
or dl, al
lea eax, [rcx - 1]
not eax
sar eax, 0x1f
and al, sil
not al
and dl, al
and dl, r15b
cmp r10d, dword [rsp + 0x40]
jb 0x18018daf5
movsxd rax, dword [rsp + 0x20]
movsxd rcx, edi
sub rax, rcx
add rax, r9
movzx ecx, byte [rbp + rax + 0xa0]
movzx eax, r14b
and cl, bl
and al, dl
movzx edx, cl
or dl, al
mov ecx, dword [rsp + 0x28]
mov byte [rbp + r9 + 0x1f0], dl
mov edx, dword [rsp + 0x3c]
inc r10d
inc r9
cmp r10d, edi
jb 0x18018da77
mov r14d, dword [rsp + 0x38]
lea rdx, [rbp + 0x1f0]
lea rcx, [rbp - 0x40]
call qword [rsp + 0x30]
lea rdx, [rbp + 0x1f0]
lea rcx, [rbp - 0x40]
call qword [rsp + 0x48]
mov esi, dword [rsp + 0x24]
test esi, esi
je 0x18018db69
xor ecx, ecx
mov r8d, esi
nop word [rax + rax]
movzx eax, byte [rbp + rcx + 0x1f0]
inc rcx
and al, bl
or byte [rbp + rcx + 0xaf], al
dec r8
jne 0x18018db50
mov ecx, dword [rsp + 0x28]
mov r8, qword [rsp + 0x78]
mov r11d, dword [rsp + 0x20]
mov edx, dword [rsp + 0x70]
mov r9d, dword [rsp + 0x6c]
inc r14d
mov dword [rsp + 0x38], r14d
cmp r14d, dword [rsp + 0x2c]
jbe 0x18018da10
jmp 0x18018db99
mov esi, dword [rsp + 0x24]
lea rcx, [rbp - 0x78]
call sym.VBoxRT.dll_EVP_MD_CTX_init
mov rdx, qword [rbp - 0x58]
lea rcx, [rbp - 0x78]
xor r8d, r8d
call sym.VBoxRT.dll_EVP_DigestInit_ex
cmp byte [rbp + 0x318], 0
mov r15, qword [rsp + 0x388]
je 0x18018dbf4
mov ebx, dword [rsp + 0x50]
lea rcx, [rbp + 0x170]
mov edx, 0x5c
mov r8d, ebx
call sub.MSVCR100.dll_memset
mov r8d, dword [rbp + 0x310]
mov rdx, qword [rbp - 0x80]
lea rcx, [rbp - 0x78]
call sym.VBoxRT.dll_EVP_DigestUpdate
mov r8d, ebx
jmp 0x18018dc0f
test edi, edi
je 0x18018dc0c
lea rax, [rbp + 0x170]
mov ecx, edi
xor byte [rax], 0x6a
inc rax
dec rcx
jne 0x18018dc01
mov r8d, edi
lea rdx, [rbp + 0x170]
lea rcx, [rbp - 0x78]
call sym.VBoxRT.dll_EVP_DigestUpdate
lea rdx, [rbp + 0xb0]
lea rcx, [rbp - 0x78]
mov r8d, esi
call sym.VBoxRT.dll_EVP_DigestUpdate
mov rdx, qword [rbp - 0x50]
lea r8, [rsp + 0x74]
lea rcx, [rbp - 0x78]
call sym.VBoxRT.dll_EVP_DigestFinal
mov r11, qword [rbp - 0x48]
test r11, r11
je 0x18018dc54
mov eax, dword [rsp + 0x74]
mov qword [r11], rax
lea rcx, [rbp - 0x78]
call sym.VBoxRT.dll_EVP_MD_CTX_cleanup
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.180227610
add rsp, 0x390
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret