Function at 0x6b61de20
Capabilities:
Authenticate hmac
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x308
xor ecx, ecx
cmp dword [ebp + 0x20], 0xfffff
ja 0x6b61e605
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
push 0x6b7a9e38
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61dea7
lea eax, [esp + 0x128]
push eax
call fcn.6b58f9a0
add esp, 4
test eax, eax
mov ecx, 0
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e6b0
mov dword [esp + 0xc], 0x6b58f8e0
mov ebx, 0x10
mov dword [esp], 0x40
mov al, 1
mov dword [esp + 4], eax
mov dword [esp + 8], 8
mov eax, 0x30
jmp 0x6b61df91
push 0x6b7a9e3c
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61deed
lea eax, [esp + 0x128]
push eax
call fcn.6b5b5f10
add esp, 4
xor ecx, ecx
test eax, eax
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e720
mov dword [esp + 0xc], 0x6b5b5e30
mov ebx, 0x14
jmp 0x6b61df75
push 0x6b7a9e41
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61df30
lea eax, [esp + 0x128]
push eax
call fcn.6b5b63f0
add esp, 4
xor ecx, ecx
test eax, eax
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e7a0
mov dword [esp + 0xc], 0x6b5b67d0
mov ebx, 0x1c
jmp 0x6b61df75
push 0x6b7a9e4a
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61e60f
lea eax, [esp + 0x128]
push eax
call fcn.6b5b6450
add esp, 4
xor ecx, ecx
test eax, eax
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e7a0
mov dword [esp + 0xc], 0x6b5b67d0
mov ebx, 0x20
mov dword [esp], 0x40
mov dword [esp + 8], 8
mov eax, 0x28
mov dword [esp + 4], 0
mov cl, byte [ebp + 0x2c]
mov edx, dword [ebp + 0x28]
test cl, cl
mov dword [esp + 0x30], eax
lea eax, [edx + eax + 0xb]
mov esi, 0xd
cmovne esi, eax
mov eax, 2
jne 0x6b61dfbf
mov edi, dword [esp]
lea eax, [edi + ebx + 0xff]
xor edx, edx
div edi
inc eax
mov dword [esp + 0x1c], eax
mov edx, ebx
mov dword [esp + 0x24], ebx
xor ebx, ebx
test cl, cl
setne bl
mov eax, dword [ebp + 0x20]
add eax, esi
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 8]
lea eax, [ecx + eax - 1]
mov edi, dword [esp]
add eax, edi
sub eax, edx
xor edx, edx
div edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], esi
mov ecx, dword [ebp + 0x1c]
add ecx, esi
mov eax, ecx
xor edx, edx
div edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 8]
add eax, ecx
xor edx, edx
div edi
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x1c]
add ebx, edx
mov esi, dword [esp + 0x10]
mov eax, esi
sub eax, edx
mov edx, eax
mov dword [esp], edi
imul edx, edi
xor edi, edi
cmp esi, ebx
cmovbe edx, edi
mov dword [esp + 0x10], edx
cmovbe eax, edi
shl ecx, 3
cmp byte [ebp + 0x2c], 0
mov ebx, ecx
mov dword [esp + 0x28], eax
je 0x6b61e097
cmp byte [esp + 4], 0
je 0x6b61e0f9
lea esi, [esp + 0x58]
mov edi, dword [esp + 8]
push edi
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, ebx
shr eax, 0x18
mov byte [edi + esi - 5], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + esi - 6], al
mov byte [edi + esi - 7], bh
lea esi, [edi - 8]
mov byte [esp + esi + 0x58], bl
cmp dword [esp + 0x10], 0
mov ebx, dword [esp]
jne 0x6b61e14b
jmp 0x6b61e2a8
lea esi, [esp + 0x284]
push dword [esp]
push 0
push esi
call sub.msvcrt.dll_memset
xor ecx, ecx
add esp, 0xc
cmp dword [ebp + 0x28], 0x80
ja 0x6b61e605
mov edi, dword [esp]
lea ebx, [ebx + edi*8]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor byte [esi], 0x36
inc esi
dec edi
jne 0x6b61e0d0
lea eax, [esp + 0x284]
lea ecx, [esp + 0x128]
push eax
push ecx
call dword [esp + 0x14]
add esp, 8
cmp byte [esp + 4], 0
jne 0x6b61e053
mov dword [esp + 4], ebx
mov ebx, dword [esp + 8]
lea esi, [ebx - 1]
lea eax, [ebx - 4]
lea edi, [esp + 0x58]
push eax
push 0
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [esp + 4]
shr eax, 0x18
mov byte [esp + ebx + 0x54], al
mov eax, dword [esp + 4]
shr eax, 0x10
mov byte [ebx + edi - 3], al
mov eax, dword [esp + 4]
mov byte [ebx + edi - 2], ah
mov ebx, dword [esp + 4]
mov byte [esp + esi + 0x58], bl
cmp dword [esp + 0x10], 0
mov ebx, dword [esp]
je 0x6b61e2a8
cmp byte [ebp + 0x2c], 0
je 0x6b61e20d
xor ecx, ecx
mov edi, dword [esp + 0x20]
sub edi, ebx
jbe 0x6b61e605
lea ecx, [esp + 0x128]
mov eax, dword [ebp + 0x14]
push eax
push ecx
mov esi, dword [esp + 0x14]
call esi
add esp, 8
mov eax, dword [ebp + 0x14]
add eax, ebx
lea ecx, [esp + 0xa8]
push edi
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + edi + 0xa8]
mov ecx, ebx
sub ecx, edi
push ecx
push dword [ebp + 0x18]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x12c]
push eax
mov dword [esp + 0x14], esi
call esi
add esp, 8
mov eax, dword [esp + 0x10]
xor edx, edx
div ebx
dec eax
cmp eax, 2
jb 0x6b61e2a8
mov esi, eax
lea edi, [ebx + ebx]
sub edi, dword [esp + 0x20]
add edi, dword [ebp + 0x18]
mov ebx, 1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push edi
lea eax, [esp + 0x12c]
push eax
call dword [esp + 0x14]
add esp, 8
inc ebx
add edi, dword [esp]
cmp ebx, esi
jne 0x6b61e1f0
jmp 0x6b61e2a8
mov ecx, dword [ebp + 0x14]
mov al, byte [ecx + 0xc]
mov byte [esp + 0xb4], al
mov eax, dword [ecx + 8]
mov dword [esp + 0xb0], eax
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esp + 0xac], ecx
mov dword [esp + 0xa8], eax
lea eax, [esp + 0xb5]
mov ecx, dword [esp]
lea ecx, [ecx - 0xd]
push ecx
push dword [ebp + 0x18]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 0xa8]
lea ecx, [esp + 0x128]
push eax
push ecx
call dword [esp + 0x14]
mov ecx, dword [esp + 8]
add esp, 8
mov eax, dword [esp + 0x10]
xor edx, edx
div ecx
cmp eax, 2
jb 0x6b61e2a8
mov esi, eax
mov eax, dword [ebp + 0x18]
lea edi, [ecx + eax - 0xd]
mov ebx, 1
nop
nop
nop
nop
nop
push edi
lea eax, [esp + 0x12c]
push eax
call dword [esp + 0x14]
add esp, 8
inc ebx
add edi, dword [esp]
cmp ebx, esi
jne 0x6b61e290
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
add ecx, edx
mov ebx, dword [esp + 0x20]
jb 0x6b61e516
mov eax, dword [esp + 0x2c]
not eax
mov dword [esp + 0x54], eax
mov eax, dword [esp]
mov edi, eax
mov esi, dword [esp + 8]
sub edi, esi
mov dword [esp + 0x50], edi
sub esi, eax
lea eax, [esp + esi + 0x58]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x1c], ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edx
xor eax, dword [esp + 0x38]
mov ecx, eax
not ecx
dec eax
and eax, ecx
sar eax, 0x1f
mov dword [esp + 0x28], edx
xor edx, dword [esp + 0x34]
mov ecx, edx
not ecx
dec edx
and edx, ecx
sar edx, 0x1f
mov dword [esp + 8], edx
movzx ecx, al
mov dword [esp + 4], ecx
mov ecx, edx
not cl
or cl, al
mov byte [esp + 0x17], cl
not al
mov byte [esp + 0x16], al
movzx eax, dl
mov dword [esp + 0x4c], eax
not eax
mov dword [esp + 0x48], eax
mov esi, dword [esp + 0x10]
mov eax, dword [ebp + 0x14]
add eax, esi
mov dword [esp + 0x44], eax
xor edi, edi
mov ecx, dword [esp]
jmp 0x6b61e409
mov edx, dword [esp + 8]
inc esi
mov byte [esp + edi + 0x204], bl
inc edi
cmp ecx, edi
mov ebx, dword [esp + 0x20]
je 0x6b61e4b0
mov eax, dword [esp + 0x10]
add eax, edi
cmp eax, ebx
jae 0x6b61e420
mov eax, dword [esp + 0x44]
add eax, edi
jmp 0x6b61e42d
cmp eax, dword [esp + 0x40]
jae 0x6b61e440
mov eax, esi
sub eax, ebx
add eax, dword [ebp + 0x18]
movzx ebx, byte [eax]
jmp 0x6b61e442
xor ebx, ebx
mov eax, edi
sub eax, dword [esp + 0x2c]
sar eax, 0x1f
xor eax, 0xff
and eax, dword [esp + 4]
movzx ebx, bl
mov edx, eax
not eax
and eax, ebx
and edx, 0x80
or eax, edx
mov edx, dword [esp + 0x54]
lea ebx, [edi + edx]
sar ebx, 0x1f
or bl, byte [esp + 0x16]
and bl, byte [esp + 0x17]
and bl, al
cmp edi, dword [esp + 0x50]
jb 0x6b61e3f0
mov eax, dword [esp + 0x3c]
movzx eax, byte [eax + edi]
movzx edx, bl
mov ecx, dword [esp + 0x4c]
and ecx, eax
mov ebx, dword [esp + 0x48]
and ebx, edx
or ebx, ecx
mov ecx, dword [esp]
jmp 0x6b61e3f0
lea eax, [esp + 0x204]
push eax
lea eax, [esp + 0x12c]
push eax
mov esi, edx
call dword [esp + 0x14]
add esp, 8
lea eax, [esp + 0x204]
push eax
lea eax, [esp + 0x12c]
push eax
call dword [esp + 0x20]
add esp, 8
add dword [esp + 0x10], edi
xor eax, eax
mov edi, dword [esp + 0x24]
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax + 0x204]
mov edx, esi
and cl, dl
or byte [esp + eax + 0x68], cl
inc eax
cmp edi, eax
jne 0x6b61e4f0
mov edx, dword [esp + 0x28]
inc edx
mov ecx, dword [esp + 0x1c]
cmp edx, ecx
jbe 0x6b61e390
call fcn.6b564070
mov edi, eax
xor esi, esi
test eax, eax
je 0x6b61e5fa
push 0
push dword [ebp + 8]
push edi
call fcn.6b564600
add esp, 0xc
test eax, eax
jle 0x6b61e5fa
cmp byte [ebp + 0x2c], 0
je 0x6b61e585
lea eax, [esp + 0x284]
mov ebx, dword [esp + 0x30]
push ebx
push 0x5c
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push edi
call fcn.6b564620
add esp, 0xc
test eax, eax
jle 0x6b61e5fa
push ebx
lea eax, [esp + 0x288]
push eax
push edi
call fcn.6b564620
add esp, 0xc
jmp 0x6b61e5b1
xor eax, eax
mov ecx, dword [esp]
nop
nop
nop
nop
nop
nop
xor byte [esp + eax + 0x284], 0x6a
inc eax
cmp ecx, eax
jne 0x6b61e590
lea eax, [esp + 0x284]
push ecx
push eax
push edi
call fcn.6b564620
add esp, 0xc
xor esi, esi
test eax, eax
jle 0x6b61e5fa
lea eax, [esp + 0x68]
push dword [esp + 0x24]
push eax
push edi
call fcn.6b564620
add esp, 0xc
test eax, eax
jle 0x6b61e5fa
lea eax, [esp + 0x204]
push eax
push dword [ebp + 0xc]
push edi
call fcn.6b564700
add esp, 0xc
mov esi, 1
cmp dword [ebp + 0x10], 0
je 0x6b61e5fa
test eax, eax
je 0x6b61e5fa
mov eax, dword [esp + 0x204]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
push edi
call fcn.6b564090
add esp, 4
mov ecx, esi
mov eax, ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6b7a9e53
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61e64e
lea eax, [esp + 0x128]
push eax
call fcn.6b5b6ba0
add esp, 4
xor ecx, ecx
test eax, eax
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e870
mov dword [esp + 0xc], 0x6b5b7100
mov ebx, 0x30
jmp 0x6b61e68b
push 0x6b7a9e5c
push edi
call fcn.6b56eb80
add esp, 8
test eax, eax
je 0x6b61e69f
lea eax, [esp + 0x128]
push eax
call fcn.6b5b6c50
add esp, 4
xor ecx, ecx
test eax, eax
jle 0x6b61e605
mov dword [esp + 0x18], 0x6b61e870
mov dword [esp + 0xc], 0x6b5b7100
mov ebx, 0x40
mov dword [esp], pe_nt_image_headers32
mov dword [esp + 8], 0x10
jmp 0x6b61df84
test esi, esi
je 0x6b61e6a9
mov dword [esi], 0
xor ecx, ecx
jmp 0x6b61e605