Function at 0x76b3da72
Capabilities:
Encrypt data using speck

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
xor ebx, ebx
mov dword [ebp - 0x34], 0xc
test dword [ebp + 0x14], 0x80
push esi
push ebx
pop eax
sete al
mov dword [ebp - 0x24], ebx
test dword [ebp + 0x14], 0x80
mov dword [ebp - 0x2c], eax
sete al
mov byte [ebp - 2], bl
dec al
mov dword [ebp - 0x30], ebx
and al, 0x10
mov byte [ebp - 1], al
lea eax, [ebp - 0x24]
push eax
call sym.msvcrt.dll__get_fmode
pop ecx
test eax, eax
je 0x76b3dac9
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.76b4977b
add esp, 0x14
mov al, byte [ebp - 1]
mov esi, 0x8000
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 1], al
test esi, ecx
jne 0x76b3daf3
test ecx, 0x74000
jne 0x76b3daeb
mov byte [ebp - 1], al
cmp dword [ebp - 0x24], esi
je 0x76b3daf3
mov dl, al
or dl, 0x80
mov byte [ebp - 1], dl
mov eax, ecx
and eax, 3
sub eax, ebx
je 0x76b3db5c
sub eax, 1
je 0x76b3db38
sub eax, 1
je 0x76b3db31
call sym.msvcrt.dll___doserrno
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
or dword [eax], 0xffffffff
call sym.msvcrt.dll__errno
push 0x16
pop esi
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], esi
call sym.msvcrt.dll__invalid_parameter
add esp, 0x14
mov eax, esi
jmp 0x76b3e223
mov esi, 0xc0000000
jmp 0x76b3db61
mov esi, ecx
and esi, 0x70000
neg esi
sbb esi, esi
neg esi
test cl, 8
setne al
movzx eax, al
and esi, eax
shl esi, 0x1f
add esi, 0x40000000
jmp 0x76b3db61
mov esi, 0x80000000
mov eax, dword [ebp + 0x18]
push edi
push 0x10
pop edi
mov dword [ebp - 0x1c], esi
push 2
pop edx
mov dword [ebp - 0x28], edx
sub eax, edi
je 0x76b3dba4
sub eax, edi
je 0x76b3db9f
sub eax, edi
je 0x76b3db9b
sub eax, edi
je 0x76b3db96
sub eax, 0x40
jne 0x76b3dbfe
cmp esi, 0x80000000
sete al
mov dword [ebp - 0x10], eax
mov edi, eax
jmp 0x76b3dba9
push 3
pop edi
jmp 0x76b3dba6
mov edi, edx
jmp 0x76b3dba6
xor edi, edi
inc edi
jmp 0x76b3dba6
mov edi, ebx
mov dword [ebp - 0x10], edi
mov eax, ecx
and eax, 0x700
cmp eax, 0x400
ja 0x76b3dbe9
je 0x76b3dbe0
test eax, eax
je 0x76b3dbe0
cmp eax, 0x100
je 0x76b3dbd7
cmp eax, 0x200
je 0x76b3dc29
cmp eax, 0x300
jne 0x76b3dbfe
mov dword [ebp - 0x14], edx
jmp 0x76b3dc39
mov dword [ebp - 0x14], 4
jmp 0x76b3dc39
mov dword [ebp - 0x14], 3
jmp 0x76b3dc39
cmp eax, 0x500
je 0x76b3dc32
cmp eax, 0x600
je 0x76b3dc29
cmp eax, 0x700
je 0x76b3dc32
call sym.msvcrt.dll___doserrno
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
or dword [eax], 0xffffffff
call sym.msvcrt.dll__errno
push 0x16
pop esi
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], esi
call sym.msvcrt.dll__invalid_parameter
add esp, 0x14
mov eax, esi
jmp 0x76b3e222
mov dword [ebp - 0x14], 5
jmp 0x76b3dc39
mov dword [ebp - 0x14], 1
mov edx, 0x100
mov eax, 0x80
mov dword [ebp - 0xc], eax
test edx, ecx
je 0x76b3dc63
mov eax, dword [0x76baaf64]
not eax
and eax, dword [ebp + 0x1c]
test al, al
js 0x76b3dc60
xor eax, eax
inc eax
mov dword [ebp - 0xc], eax
jmp 0x76b3dc63
mov eax, dword [ebp - 0xc]
test cl, 0x40
je 0x76b3dc7f
or eax, 0x4000000
or esi, 0x10000
or edi, 4
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], edi
test ecx, 0x1000
je 0x76b3dc8c
or eax, edx
mov dword [ebp - 0xc], eax
test cl, 0x20
je 0x76b3dc98
or eax, 0x8000000
jmp 0x76b3dca2
test cl, 0x10
je 0x76b3dca5
or eax, 0x10000000
mov dword [ebp - 0xc], eax
call fcn.76b3b293
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x76b3dccf
call sym.msvcrt.dll___doserrno
mov dword [eax], ebx
or dword [edi], 0xffffffff
call sym.msvcrt.dll__errno
push 0x18
pop ecx
mov dword [eax], ecx
mov eax, ecx
jmp 0x76b3e222
mov eax, dword [ebp + 8]
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x14]
mov dword [eax], 1
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp + 0x10]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x76b3dd66
mov ecx, 0xc0000000
mov eax, esi
and eax, ecx
cmp eax, ecx
jne 0x76b3dd34
test byte [ebp + 0x14], 1
je 0x76b3dd34
push ebx
push dword [ebp - 0xc]
lea eax, [ebp - 0x34]
and esi, 0x7fffffff
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp + 0x10]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x76b3dd66
mov ecx, dword [edi]
mov eax, ecx
and ecx, 0x1f
sar eax, 5
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
and byte [eax + ecx + 4], 0xfe
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
call fcn.76b262a9
pop ecx
call sym.msvcrt.dll__errno
mov ebx, dword [eax]
jmp 0x76b3e220
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileType]
test eax, eax
jne 0x76b3ddb3
mov ecx, dword [edi]
mov eax, ecx
and ecx, 0x1f
sar eax, 5
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
and byte [eax + ecx + 4], 0xfe
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
push esi
call fcn.76b262a9
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test esi, esi
jne 0x76b3dd5a
call sym.msvcrt.dll__errno
mov dword [eax], 0xd
jmp 0x76b3dd5a
cmp eax, 2
jne 0x76b3ddbe
or byte [ebp - 1], 0x40
jmp 0x76b3ddc7
cmp eax, 3
jne 0x76b3ddc7
or byte [ebp - 1], 8
push dword [ebp - 0x20]
push dword [edi]
call fcn.76b3b6fd
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x76b3dde9
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x76b3e222
mov ecx, dword [edi]
mov eax, ecx
mov dl, byte [ebp - 1]
and ecx, 0x1f
sar eax, 5
or dl, 1
imul ecx, ecx, 0x24
mov byte [ebp - 1], dl
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
mov byte [eax + ecx + 4], dl
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
and dword [eax + ecx + 8], 0xfffffffc
mov al, dl
mov ecx, dword [ebp + 0x14]
and al, 0xc8
cmp al, 0x80
jne 0x76b3deb3
test cl, 2
je 0x76b3deb3
push 2
push 0xffffffffffffffff
push dword [edi]
call fcn.76b3bda1
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
jne 0x76b3de66
call sym.msvcrt.dll___doserrno
cmp dword [eax], 0x83
je 0x76b3dead
push dword [edi]
call fcn.76b3961e
jmp 0x76b3dd59
xor eax, eax
mov word [ebp - 8], ax
lea eax, [ebp - 8]
push 1
push eax
push dword [edi]
call fcn.76b3d03e
add esp, 0xc
test eax, eax
jne 0x76b3de9c
cmp word [ebp - 8], 0x1a
jne 0x76b3de9c
mov eax, dword [ebp - 0x18]
cdq
push edx
push eax
push dword [edi]
call fcn.76b39242
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3de5a
push ebx
push ebx
push dword [edi]
call fcn.76b3bda1
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3de5a
mov dl, byte [ebp - 1]
mov ecx, dword [ebp + 0x14]
test dl, dl
jns 0x76b3e123
test ecx, 0x74000
jne 0x76b3deda
mov eax, dword [ebp - 0x24]
and eax, 0x74000
jne 0x76b3ded5
or ecx, 0x4000
jmp 0x76b3ded7
or ecx, eax
mov dword [ebp + 0x14], ecx
mov eax, ecx
and eax, 0x74000
cmp eax, 0x4000
je 0x76b3df36
cmp eax, 0x10000
je 0x76b3df1e
cmp eax, 0x14000
je 0x76b3df1e
cmp eax, 0x20000
je 0x76b3df18
cmp eax, 0x24000
je 0x76b3df18
cmp eax, 0x40000
je 0x76b3df12
cmp eax, 0x44000
jne 0x76b3df39
mov byte [ebp - 2], 1
jmp 0x76b3df39
mov byte [ebp - 2], 2
jmp 0x76b3df39
mov eax, ecx
and eax, 0x301
cmp eax, 0x301
setne al
dec al
and al, 2
mov byte [ebp - 2], al
jmp 0x76b3df39
mov byte [ebp - 2], bl
test ecx, 0x70000
je 0x76b3e123
mov dword [ebp - 0x18], ebx
test dl, 0x40
jne 0x76b3e123
mov eax, 0xc0000000
mov ecx, 0xfeff
and esi, eax
cmp esi, 0x40000000
je 0x76b3e0aa
cmp esi, 0x80000000
je 0x76b3dfe6
cmp esi, eax
jne 0x76b3e123
mov eax, dword [ebp - 0x14]
sub eax, 1
je 0x76b3e092
sub eax, 1
je 0x76b3e092
sub eax, 1
je 0x76b3dfa6
sub eax, 1
je 0x76b3dfa6
sub eax, 1
je 0x76b3e092
jmp 0x76b3e123
push 2
push ebx
push ebx
push dword [edi]
call fcn.76b3bf3b
add esp, 0x10
or eax, edx
je 0x76b3dfd7
push ebx
push ebx
push ebx
push dword [edi]
call fcn.76b3bf3b
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x76b3de5a
xor eax, eax
mov esi, ebx
inc eax
jmp 0x76b3dfdc
xor esi, esi
mov eax, ebx
inc esi
test eax, eax
je 0x76b3e085
jmp 0x76b3dfe8
mov esi, ebx
push 3
lea eax, [ebp - 0x18]
push eax
push dword [edi]
call fcn.76b3d03e
add esp, 0xc
test eax, eax
jle 0x76b3e005
cmp esi, 1
jne 0x76b3e00e
mov esi, ebx
jmp 0x76b3e00e
cmp eax, 0xffffffff
je 0x76b3de5a
mov ecx, dword [ebp - 0x18]
push 2
pop edx
cmp eax, edx
je 0x76b3e02b
cmp eax, 3
jne 0x76b3e070
cmp ecx, 0xbfbbef
jne 0x76b3e02b
mov byte [ebp - 2], 1
jmp 0x76b3e085
movzx eax, cx
cmp eax, 0xfffe
jne 0x76b3e04e
push dword [edi]
call fcn.76b3961e
pop ecx
call sym.msvcrt.dll__errno
push 0x16
pop esi
mov ebx, esi
mov dword [eax], esi
jmp 0x76b3e220
cmp eax, 0xfeff
jne 0x76b3e070
push ebx
push edx
push dword [edi]
call fcn.76b3bda1
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3de5a
mov byte [ebp - 2], 2
jmp 0x76b3e085
push ebx
push ebx
push dword [edi]
call fcn.76b3bda1
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3de5a
test esi, esi
je 0x76b3e123
mov ecx, 0xfeff
movzx eax, byte [ebp - 2]
mov esi, ebx
mov dword [ebp - 0x18], ebx
sub eax, 1
je 0x76b3e0f0
sub eax, 1
jne 0x76b3e123
push 2
pop eax
jmp 0x76b3e0fb
mov eax, dword [ebp - 0x14]
sub eax, 1
je 0x76b3e092
sub eax, 1
je 0x76b3e092
sub eax, 1
je 0x76b3e0c5
sub eax, 1
jne 0x76b3df98
push 2
push ebx
push ebx
push dword [edi]
call fcn.76b3bf3b
add esp, 0x10
or eax, edx
je 0x76b3e08d
push ebx
push ebx
push ebx
push dword [edi]
call fcn.76b3bf3b
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x76b3e123
jmp 0x76b3de5a
push 3
pop eax
mov dword [ebp - 0x28], eax
mov ecx, 0xbfbbef
mov dword [ebp - 0x18], ecx
sub eax, esi
push eax
lea eax, [ebp - 0x18]
add eax, esi
push eax
push dword [edi]
call sym.msvcrt.dll__write
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3de5a
add esi, eax
mov eax, dword [ebp - 0x28]
cmp eax, esi
jg 0x76b3e0fe
mov ecx, dword [edi]
mov eax, ecx
and ecx, 0x1f
sar eax, 5
imul esi, ecx, 0x24
mov edx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
movzx eax, byte [ebp - 2]
mov ecx, dword [edx + esi + 8]
and ecx, 0xfffffffc
or ecx, eax
mov dword [edx + esi + 8], ecx
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
imul edx, ecx, 0x24
mov ecx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
mov eax, dword [ebp + 0x14]
shr eax, 0xd
xor eax, dword [ecx + edx + 8]
and eax, 8
xor dword [ecx + edx + 8], eax
test byte [ebp - 1], 0x48
mov ecx, dword [ebp + 0x14]
jne 0x76b3e197
test cl, 8
je 0x76b3e197
mov ecx, dword [edi]
mov eax, ecx
and ecx, 0x1f
sar eax, 5
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
or byte [eax + ecx + 4], 0x20
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x1c]
mov edx, 0xc0000000
mov eax, esi
and eax, edx
cmp eax, edx
jne 0x76b3e220
test cl, 1
je 0x76b3e220
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
push ebx
push dword [ebp - 0xc]
lea eax, [ebp - 0x34]
and esi, 0x7fffffff
push 3
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp + 0x10]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x76b3e209
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
call fcn.76b262a9
mov ecx, dword [edi]
mov eax, ecx
and ecx, 0x1f
sar eax, 5
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
and byte [eax + ecx + 4], 0xfe
push dword [edi]
call fcn.76b3b466
pop ecx
jmp 0x76b3dd59
mov edx, dword [edi]
mov ecx, edx
sar ecx, 5
and edx, 0x1f
imul edx, edx, 0x24
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov dword [edx + ecx], eax
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret