Function at 0x5e7540
Capabilities:
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
cmp dword [ebp + 0x10], 0x6611
jne 0x5e75bf
mov dword [ebp + 0x10], 0x660e
cmp dword [ebp + 0x10], 0x6611
je 0x5e75f7
cmp dword [ebp + 0x10], 0x660e
je 0x5e75f7
cmp dword [ebp + 0x10], 0x660f
je 0x5e75f7
cmp dword [ebp + 0x10], 0x6610
je 0x5e75f7
xor eax, eax
jmp 0x5e75fc
mov eax, 1
test eax, eax
je 0x5e7610
mov dword [ebp - 4], 0x18
jmp 0x5e7617
mov dword [ebp - 4], 1
cmp dword [ebp + 0x24], 0
jne 0x5e7628
mov dword [ebp + 0x24], 1
mov dword [ebp - 0x3c], esp
push 0xf0000000
push dword [ebp - 4]
push 0xa13344
push 0xa13344
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7667
push 0x1ea
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5e76d6
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 4]
push 0xa13344
push 0xa13344
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e76b9
push 0x245
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5e76d6
mov eax, 0xa13348
jmp 0x5e7efe
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x5e76f2
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00645a7b
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x5e7703
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x5e7723
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00645a7b
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x5e7734
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push 0
push 2
push 8
call fcn.005e72ac
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x5e7766
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
push eax
call fcn.005e6634
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x198
call fcn.00646d90
add esp, 0x10
mov dword [ebp - 0x40], eax
push dword [ebp - 0xc]
push dword [ebp - 0x40]
push dword [ebp - 0x14]
mov ecx, 3
call fcn.005668a8
add esp, 0xc
mov dword [ebp - 0x44], eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x5e77bc
push ebx
call fcn.00645a87
add esp, 4
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x5e77d3
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
call fcn.005e6634
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], esp
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push dword [ebp - 0x3c]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5e7801
add eax, 8
push eax
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptImportKey]
nop
nop
cmp dword [ebp - 0x40], esp
je 0x5e782b
push 0x3dd
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x5e7879
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e786f
push 0x412
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov eax, 0xa13348
jmp 0x5e7efe
push 0x80000301
push 0
push dword [ebp + 0x24]
push 1
mov ebx, 0x198
call fcn.00646d90
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x5e78ac
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x3c], esp
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x5e78c9
add eax, 8
push eax
push 4
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptSetKeyParam]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e78f8
push 0x4da
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5e7972
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7937
push 0x50e
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7968
push 0x528
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov eax, 0xa13348
jmp 0x5e7efe
push 0x80000301
push 0
push 4
push 1
mov ebx, 0x1bc
call fcn.00646e70
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x5e79a7
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x3c], esp
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x5e79c8
add eax, 8
push eax
push 8
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptGetKeyParam]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e79f7
push 0x5f4
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push reloc.WS2_32.dll_getpeername
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x5e7a1c
mov eax, 0xa13348
push eax
push 3
mov ebx, 0x19c
call fcn.006473f0
add esp, 0x28
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
cmp ecx, 0x80000101
jne 0x5e7a56
and eax, 0xff
jmp 0x5e7ab7
cmp ecx, 0x80000201
jne 0x5e7a61
cwde
jmp 0x5e7ab7
cmp ecx, 0x80000301
je 0x5e7ab7
cmp ecx, 0x80000401
je 0x5e7ab7
mov dword [ebp - 0x4c], eax
cmp ecx, 0x80000501
je 0x5e7a9e
cmp ecx, 0x80000601
je 0x5e7aa6
push 0x643
push 0x4367c3c
push 2
call fcn.00645a6f
add esp, 0xc
fld dword [ebp - 0x4c]
jmp 0x5e7ab2
mov dword [ebp - 0x48], edx
fld qword [ebp - 0x4c]
call fcn.004ef9d0
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x40]
fld qword [ebp - 0x40]
fdiv qword [0xa1397c]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
call fcn.004ef9d0
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5e7b4e
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7b13
push 0x6d7
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7b44
push 0x6f1
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov eax, 0xa13348
jmp 0x5e7efe
mov eax, 0xa13348
xor ecx, ecx
test eax, eax
je 0x5e7b5c
mov ecx, dword [eax + 4]
push ecx
add eax, 8
push eax
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
xor ebx, ebx
test eax, eax
je 0x5e7b6f
mov ebx, dword [eax + 4]
add eax, 8
push eax
cmp ebx, ecx
mov eax, 1
jne 0x5e7b86
dec eax
test ecx, ecx
je 0x5e7b86
call fcn.004f28d8
add esp, 0xc
test eax, eax
jne 0x5e7bcc
push 0x80000301
push 0
push dword [ebp - 0x28]
push 1
mov ebx, 0x1bc
call fcn.00646e70
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ebx, dword [ebp + 0x14]
mov ebx, dword [ebx]
test ebx, ebx
je 0x5e7bc6
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov ebx, dword [ebp + 0x14]
mov dword [ebx], eax
mov dword [ebp - 0x3c], esp
push 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
test eax, eax
je 0x5e7be0
add eax, 8
push eax
push 1
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptSetKeyParam]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7c0f
push 0x840
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5e7c89
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7c4e
push 0x874
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7c7f
push 0x88e
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov eax, 0xa13348
jmp 0x5e7efe
push dword [ebp + 8]
call fcn.005e6634
mov dword [ebp - 0x2c], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x40]
push 0x80000601
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
fild dword [ebp - 0x2c]
fstp qword [ebp - 0x48]
push 0x80000601
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push 2
mov ebx, 0x48
call fcn.00648320
add esp, 0x1c
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
fild dword [ebp - 0x28]
fstp qword [ebp - 0x58]
fld qword [ebp - 0x58]
fmul qword [0xa1336c]
fstp qword [ebp - 0x60]
fild dword [ebp - 0x2c]
fstp qword [ebp - 0x68]
fld qword [ebp - 0x68]
fadd qword [ebp - 0x50]
fadd qword [ebp - 0x60]
fstp qword [ebp - 0x70]
fld qword [ebp - 0x70]
call fcn.004ef9d0
mov dword [ebp - 0x30], eax
push 0x80000301
push 0
push dword [ebp - 0x30]
push 1
mov ebx, 0x1bc
call fcn.00646e70
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ebx, dword [ebp - 0x34]
test ebx, ebx
je 0x5e7d5a
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
call fcn.005e6658
mov dword [ebp - 0x38], eax
push dword [ebp + 8]
call fcn.005e6658
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], esp
push dword [ebp - 0x2c]
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
xor eax, eax
call dword [0xa828a8]
nop
nop
cmp dword [ebp - 0x40], esp
je 0x5e7da7
push 0xa2e
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x38]
push 0
push 1
push 0
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptEncrypt]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7dec
push 0xa8c
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5e7e66
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7e2b
push 0xb1f
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7e5c
push 0xb39
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov eax, 0xa13348
jmp 0x5e7efe
mov dword [ebp - 0x3c], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7e92
push 0xb73
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
mov dword [ebp - 0x3c], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x3c], esp
je 0x5e7ec3
push 0xb8d
push 0x4367c3c
push 6
call fcn.00645a6f
add esp, 0xc
push 0x80000301
push 0
push dword [ebp - 0x2c]
push reloc.WS2_32.dll_getpeername
push 0
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x5e7ee0
mov eax, 0xa13348
push eax
push 2
mov ebx, 0x1a0
call fcn.006472c0
add esp, 0x1c
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
jmp 0x5e7efe
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x5e7f0f
push ebx
call fcn.00645a87
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x5e7f1f
push ebx
call fcn.00645a87
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x5e7f2f
push ebx
call fcn.00645a87
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x5e7f3f
push ebx
call fcn.00645a87
add esp, 4
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x5e7f4f
push ebx
call fcn.00645a87
add esp, 4
mov ebx, dword [ebp - 0x34]
test ebx, ebx
je 0x5e7f5f
push ebx
call fcn.00645a87
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x24