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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
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
push 8
call fcn.00438977
add esp, 4
mov dword [ebp - 0x2c], eax
mov edi, eax
mov esi, 0x46c39b
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
jmp 0x408f98
cmp dword [ebp + 0x10], 0x6611
jne 0x408fac
mov dword [ebp + 0x10], 0x660e
cmp dword [ebp + 0x10], 0x6611
je 0x408fe4
cmp dword [ebp + 0x10], 0x660e
je 0x408fe4
cmp dword [ebp + 0x10], 0x660f
je 0x408fe4
cmp dword [ebp + 0x10], 0x6610
je 0x408fe4
xor eax, eax
jmp 0x408fe9
mov eax, 1
test eax, eax
je 0x408ffd
mov dword [ebp - 4], 0x18
jmp 0x409004
mov dword [ebp - 4], 1
cmp dword [ebp + 0x1c], 0
jne 0x409015
mov dword [ebp + 0x1c], 1
cmp dword [ebp + 0x24], 0
jne 0x409026
mov dword [ebp + 0x24], 1
mov dword [ebp - 0x44], esp
push 0xf0000000
push dword [ebp - 4]
push 0x46c304
push 0x46c304
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x40905b
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4090b4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 4]
push 0x46c304
push 0x46c304
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x40909d
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4090b4
mov eax, 0x46c39b
jmp 0x4098cf
push reloc.WSOCK32.dll_getpeername
push 0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
jne 0x4090c9
mov eax, 0x46c39b
push eax
push 1
mov ebx, 0x198
call fcn.00439980
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4090f3
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x409113
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00438977
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 0x409124
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push 0
push 2
push 8
call fcn.00408c66
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x409156
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
push reloc.WSOCK32.dll_getpeername
push 0
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40916d
mov eax, 0x46c39b
push eax
push 1
mov ebx, 0x194
call fcn.00439f20
add esp, 0x10
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x198
call fcn.00439980
add esp, 0x10
mov dword [ebp - 0x48], eax
push dword [ebp - 0xc]
push dword [ebp - 0x48]
push dword [ebp - 0x14]
mov ecx, 3
call fcn.0040543f
add esp, 0xc
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x48]
test ebx, ebx
je 0x4091c6
push ebx
call fcn.00438983
add esp, 4
mov eax, dword [ebp - 0x4c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4091da
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
push reloc.WSOCK32.dll_getpeername
push 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4091f1
mov eax, 0x46c39b
push eax
push 1
mov ebx, 0x194
call fcn.00439f20
add esp, 0x10
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], esp
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push dword [ebp - 0x44]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x409225
add eax, 8
push eax
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
nop
nop
cmp dword [ebp - 0x48], esp
je 0x409245
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x409283
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x409279
push 6
call fcn.0043896b
add esp, 4
mov eax, 0x46c39b
jmp 0x4098cf
push 0x80000301
push 0
push dword [ebp + 0x24]
push 1
mov ebx, 0x198
call fcn.00439980
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4092b6
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x44], esp
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4092d3
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 - 0x44], esp
je 0x4092f8
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x409358
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x409327
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x40934e
push 6
call fcn.0043896b
add esp, 4
mov eax, 0x46c39b
jmp 0x4098cf
push 0x80000301
push 0
push 4
push 1
mov ebx, 0x1bc
call fcn.00439cf0
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40938d
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x44], esp
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4093ae
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 - 0x44], esp
je 0x4093d3
push 6
call fcn.0043896b
add esp, 4
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push reloc.WSOCK32.dll_getpeername
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4093f8
mov eax, 0x46c39b
push eax
push 3
mov ebx, 0x19c
call fcn.00439b50
add esp, 0x28
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
cmp ecx, 0x80000101
jne 0x40942c
and eax, 0xff
jmp 0x409477
cmp ecx, 0x80000201
jne 0x409437
cwde
jmp 0x409477
cmp ecx, 0x80000301
je 0x409477
cmp ecx, 0x80000401
je 0x409477
mov dword [ebp - 0x54], eax
cmp ecx, 0x80000501
je 0x409467
cmp ecx, 0x80000601
je 0x40946c
push 2
call fcn.0043896b
add esp, 4
fld dword [ebp - 0x54]
jmp 0x409472
mov dword [ebp - 0x50], edx
fld qword [ebp - 0x54]
call fcn.00402f03
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fdiv qword [0x47f2b2]
fstp qword [ebp - 0x50]
fld qword [ebp - 0x50]
call fcn.00402f03
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4094f4
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4094c3
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4094ea
push 6
call fcn.0043896b
add esp, 4
mov eax, 0x46c39b
jmp 0x4098cf
mov eax, 0x46c39b
xor ecx, ecx
test eax, eax
je 0x409502
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 0x409515
mov ebx, dword [eax + 4]
add eax, 8
push eax
cmp ebx, ecx
mov eax, 1
jne 0x40952c
dec eax
test ecx, ecx
je 0x40952c
call fcn.004036c1
add esp, 0xc
test eax, eax
jne 0x409572
push 0x80000301
push 0
push dword [ebp - 0x28]
push 1
mov ebx, 0x1bc
call fcn.00439cf0
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp + 0x14]
mov ebx, dword [ebx]
test ebx, ebx
je 0x40956c
push ebx
call fcn.00438983
add esp, 4
pop eax
mov ebx, dword [ebp + 0x14]
mov dword [ebx], eax
mov dword [ebp - 0x44], esp
push 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
test eax, eax
je 0x409586
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 - 0x44], esp
je 0x4095ab
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x40960b
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4095da
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x409601
push 6
call fcn.0043896b
add esp, 4
mov eax, 0x46c39b
jmp 0x4098cf
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x10]
push eax
call fcn.0040998c
mov ebx, dword [ebp - 0x2c]
call fcn.0040428d
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
xor ecx, ecx
push eax
lea eax, [ebp - 0x34]
mov ebx, eax
pop eax
inc ecx
push ecx
push ebx
mov dword [ebx], ecx
push eax
cmp ecx, eax
jg 0x40982d
mov ebx, dword [ebp - 0x2c]
call fcn.004010c7
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x40965d
push 4
call fcn.0043896b
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x409670
push 1
call fcn.0043896b
add esp, 4
shl eax, 2
add ebx, eax
mov dword [ebp - 0x44], ebx
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
test eax, eax
je 0x409694
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00438977
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4096a5
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp - 0x2c]
call fcn.004010c7
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4096c6
push 4
call fcn.0043896b
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x4096d9
push 1
call fcn.0043896b
add esp, 4
shl eax, 2
add ebx, eax
mov dword [ebp - 0x44], ebx
push reloc.WSOCK32.dll_getpeername
push 0
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
test eax, eax
jne 0x4096f6
mov eax, 0x46c39b
push eax
push 1
mov ebx, 0x194
call fcn.00439f20
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], esp
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40971d
add eax, 8
push eax
push 0
push 0
push 0
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x40974c
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4097ac
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x40977b
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4097a2
push 6
call fcn.0043896b
add esp, 4
mov eax, 0x46c39b
jmp 0x4098cf
push 0x80000301
push 0
push dword [ebp - 0x3c]
push reloc.WSOCK32.dll_getpeername
push 0
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x4097c9
mov eax, 0x46c39b
push eax
push 2
mov ebx, 0x1a0
call fcn.00439f30
add esp, 0x1c
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4097f3
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
push dword [ebp - 0x38]
push dword [ebp - 0x40]
mov ecx, 2
call fcn.0040543f
add esp, 8
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x409821
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
pop eax
pop ebx
pop ecx
jmp 0x409632
add esp, 0xc
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x409852
push 6
call fcn.0043896b
add esp, 4
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x409879
push 6
call fcn.0043896b
add esp, 4
push dword [ebp + 0x1c]
lea eax, [ebp - 0x40]
push eax
call fcn.00409d08
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x40989c
push ebx
call fcn.00438983
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4098ba
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00438977
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x4098cf
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4098e0
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4098f0
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x409900
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x409910
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x409920
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x2c]
push ebx
mov ecx, dword [ebx]
add ebx, 4
test ecx, ecx
je 0x40993e
mov eax, dword [ebx]
add ebx, 4
dec ecx
je 0x40993a
imul eax, dword [ebx]
jmp 0x40992f
mov ecx, eax
test ecx, ecx
je 0x40995d
push ecx
mov eax, dword [ebx]
test eax, eax
je 0x409956
push ebx
push eax
call fcn.00438983
add esp, 4
pop ebx
add ebx, 4
pop ecx
dec ecx
jne 0x409944
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x409975
push ebx
call fcn.00438983
add esp, 4
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x409985
push ebx
call fcn.00438983
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x24