Function at 0x402020
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47118d
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x494054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xf4], ecx
push 0
push 0
push 0x48867c
lea eax, [ebp - 0x78]
mov dword [ebp - 4], 3
push eax
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x78], 0
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
push 0
push 0x20
push str.ChainingModeGCM
push str.ChainingMode
push dword [ebp - 0x78]
call dword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov esi, dword [sym.imp.bcrypt.dll_BCryptGetProperty]
lea eax, [ebp - 0x74]
push 0
push eax
push 0xc
lea eax, [ebp - 0x8c]
push eax
push str.AuthTagLength
push dword [ebp - 0x78]
call esi
push 0
lea eax, [ebp - 0x74]
mov dword [ebp - 0x80], 0
push eax
push 4
lea eax, [ebp - 0x80]
push eax
push str.BlockLength
push dword [ebp - 0x78]
call esi
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov ebx, dword [ebp + 8]
xor esi, esi
mov edi, ecx
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xd4], ecx
sub edi, ebx
je 0x402126
cmp edi, 0x7fffffff
ja 0x40293c
push edi
lea ecx, [ebp - 0x20]
call fcn.00402960
mov esi, dword [ebp - 0x20]
push edi
push ebx
push esi
call fcn.0044df90
mov eax, dword [ebp - 0x20]
sub esi, ebx
add esp, 0xc
add esi, dword [ebp - 0xd4]
mov dword [ebp - 0x1c], esi
push 0
sub esi, eax
push esi
push eax
push 0
push 0
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x402171
mov edx, dword [ebp - 0x18]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402167
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402941
push edx
push ecx
call fcn.0044c564
add esp, 8
mov ebx, dword [ebp + 0x24]
lea esi, [ebp - 0x13]
sub ebx, dword [ebp + 0x20]
nop word [eax + eax]
mov eax, 0xcccccccd
dec esi
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [esi], bl
mov ebx, edx
test ebx, ebx
jne 0x402180
lea eax, [ebp - 0x13]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], 0xf
cmp esi, eax
je 0x4021f6
sub eax, esi
lea ecx, [ebp - 0x40]
push eax
push esi
call fcn.00401bb0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x4021f6
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4021ec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov eax, dword [ebp + 0x24]
xorps xmm0, xmm0
mov ebx, dword [ebp + 0x20]
movq qword [ebp - 0x58], xmm0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0xd4], eax
cmp ebx, eax
je 0x402250
mov esi, eax
lea ecx, [ebp - 0x58]
sub esi, ebx
push esi
call fcn.00402960
mov edi, dword [ebp - 0x58]
push esi
push ebx
push edi
call fcn.0044df90
sub edi, ebx
add esp, 0xc
add edi, dword [ebp - 0xd4]
mov dword [ebp - 0x54], edi
mov byte [ebp - 4], 4
xorps xmm0, xmm0
mov edi, dword [ebp - 0x88]
movq qword [ebp - 0x70], xmm0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
test edi, edi
je 0x4022b2
cmp edi, 0x7fffffff
ja 0x402946
push edi
lea ecx, [ebp - 0x70]
call fcn.00402960
mov eax, dword [ebp - 0x70]
push edi
push 0
push eax
lea esi, [edi + eax]
call fcn.0044e510
mov edi, dword [ebp - 0x88]
add esp, 0xc
mov dword [ebp - 0x6c], esi
mov byte [ebp - 4], 5
lea esi, [ebp - 0x13]
mov ebx, edi
nop dword [eax + eax]
mov eax, 0xcccccccd
dec esi
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [esi], bl
mov ebx, edx
test ebx, ebx
jne 0x4022c0
lea eax, [ebp - 0x13]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], 0xf
cmp esi, eax
je 0x40233c
sub eax, esi
lea ecx, [ebp - 0x40]
push eax
push esi
call fcn.00401bb0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x402336
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40232c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov ecx, dword [ebp + 0x18]
xorps xmm0, xmm0
movq qword [ebp - 0x4c], xmm0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd8], ecx
cmp eax, ecx
je 0x4023a2
mov esi, ecx
lea ecx, [ebp - 0x4c]
sub esi, eax
push esi
call fcn.00402960
mov ebx, dword [ebp - 0x4c]
push esi
mov esi, dword [ebp - 0xd4]
push esi
push ebx
call fcn.0044df90
mov edi, dword [ebp - 0x88]
sub ebx, esi
add esp, 0xc
add ebx, dword [ebp - 0xd8]
mov dword [ebp - 0x48], ebx
mov byte [ebp - 4], 6
xorps xmm0, xmm0
sub ebx, dword [ebp - 0x4c]
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
test edi, edi
je 0x402401
cmp edi, 0x7fffffff
ja 0x40294b
push edi
lea ecx, [ebp - 0x20]
call fcn.00402960
mov eax, dword [ebp - 0x20]
push edi
push 0
push eax
lea esi, [edi + eax]
call fcn.0044e510
add esp, 0xc
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 7
lea esi, [ebp - 0x2b]
mov ebx, dword [ebp - 0x54]
sub ebx, dword [ebp - 0x58]
nop
mov eax, 0xcccccccd
dec esi
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [esi], bl
mov ebx, edx
test ebx, ebx
jne 0x402410
lea eax, [ebp - 0x2b]
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0xe0], edx
mov dword [ebp - 0xdc], 0xf
cmp esi, eax
je 0x402498
sub eax, esi
lea ecx, [ebp - 0xf0]
push eax
push esi
call fcn.00401bb0
mov edx, dword [ebp - 0xdc]
cmp edx, 0x10
jb 0x402498
mov ecx, dword [ebp - 0xf0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40248e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402955
push edx
push ecx
call fcn.0044c564
add esp, 8
mov ecx, dword [ebp - 0x58]
xorps xmm0, xmm0
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x80]
sub eax, ecx
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0xc8], ecx
mov ecx, dword [ebp + 0x2c]
sub eax, ecx
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xb8], ecx
mov ecx, dword [ebp - 0x20]
sub eax, ecx
movq qword [ebp - 0x64], xmm0
mov dword [ebp - 0x5c], 0
movlpd qword [ebp - 0xc0], xmm0
movlpd qword [ebp - 0xa8], xmm0
movlpd qword [ebp - 0xa0], xmm0
movlpd qword [ebp - 0x98], xmm0
mov dword [ebp - 0xd0], 0x40
mov dword [ebp - 0xcc], 1
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
test edi, edi
je 0x40255d
cmp edi, 0x7fffffff
ja 0x40294b
push edi
lea ecx, [ebp - 0x64]
call fcn.00402960
mov eax, dword [ebp - 0x64]
push edi
push 0
push eax
lea esi, [edi + eax]
call fcn.0044e510
add esp, 0xc
mov dword [ebp - 0x60], esi
mov ecx, dword [ebp - 0xd8]
lea eax, [ebp - 0x74]
push 0
push eax
push ecx
mov byte [ebp - 4], 8
lea edx, [ebp - 0xd0]
mov eax, dword [ebp - 0x4c]
push eax
push 0
push 0
push edx
push ecx
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov edi, eax
lea esi, [ebp - 0x2b]
mov ebx, edi
nop
mov eax, 0xcccccccd
dec esi
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [esi], bl
mov ebx, edx
test ebx, ebx
jne 0x402590
lea eax, [ebp - 0x2b]
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0xe0], edx
mov dword [ebp - 0xdc], 0xf
cmp esi, eax
je 0x402618
sub eax, esi
lea ecx, [ebp - 0xf0]
push eax
push esi
call fcn.00401bb0
mov edx, dword [ebp - 0xdc]
cmp edx, 0x10
jb 0x402618
mov ecx, dword [ebp - 0xf0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40260e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402955
push edx
push ecx
call fcn.0044c564
add esp, 8
push ecx
push dword [ebp - 0x48]
lea ecx, [ebp - 0xf0]
push dword [ebp - 0x4c]
call fcn.004029e0
mov edx, dword [ebp - 0xdc]
cmp edx, 0x10
jb 0x402664
mov ecx, dword [ebp - 0xf0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40265a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402950
push edx
push ecx
call fcn.0044c564
add esp, 8
test edi, edi
js 0x4026a2
mov eax, dword [ebp - 0x74]
xor ecx, ecx
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00451031
mov ecx, dword [ebp - 0x74]
mov esi, dword [ebp - 0xf4]
inc ecx
push ecx
push 0
push eax
mov dword [esi], eax
call fcn.0044e510
push dword [ebp - 0x74]
push dword [ebp - 0x4c]
push dword [esi]
call fcn.0044df90
add esp, 0x1c
mov ecx, dword [ebp - 0x64]
test ecx, ecx
je 0x4026eb
mov edx, dword [ebp - 0x5c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4026cc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402955
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x40271f
mov edx, dword [ebp - 0x18]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402715
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402955
push edx
push ecx
call fcn.0044c564
add esp, 8
push dword [ebp - 0x7c]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
push 0
push dword [ebp - 0x78]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov ecx, dword [ebp - 0x4c]
test edi, edi
setne bl
test ecx, ecx
je 0x402781
mov edx, dword [ebp - 0x44]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402762
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp - 0x70]
test ecx, ecx
je 0x4027ca
mov edx, dword [ebp - 0x68]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4027ab
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x402813
mov edx, dword [ebp - 0x50]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4027f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x40285c
mov edx, dword [ebp + 0x10]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40283d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4028a5
mov edx, dword [ebp + 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402886
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp + 0x14], 0
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x4028ee
mov edx, dword [ebp + 0x28]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4028cf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp + 0x20], 0
mov dword [ebp + 0x24], 0
mov dword [ebp + 0x28], 0
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x40291e
mov edx, dword [ebp + 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402914
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40295a
push edx
push ecx
call fcn.0044c564
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044c0d8
mov esp, ebp
pop ebp
ret
call fcn.00402010
call fcn.00450fe0
call fcn.00402010
call fcn.00402010
call fcn.00450fe0
call fcn.00450fe0
call fcn.00450fe0
int3